Skip to Content
Menu
This question has been flagged
1 Reply
1897 Views

Hello,


I am using Odoo v15 POS to manage a restaurant, which has products with variants.

After selling a product with a variant, we can see this variant in the receipt and in the order tab (POS > Orders > Orders), but not in the sale report (POS > Reports > Sale Report), which is a little bit annoying because it forces us to manually check the order to see which variant has been sold.

I opened the QWeb report "report_saledetails" to see if I could fix it, and here is the line to modify:


but when I try to change "product_name" to "full_product_name", as in "order.line", I get an error message.


Can anyone assist me with this, please?

Avatar
Discard
Best Answer

Hello @Tariq SOBHI


I hope you are doing well,


For you to be able to print the full product name in the POS > reports > sale report.

You will need to overwrite the 'get_sale_details' method in the point_of_sale(module) > models > pos_order.py and replace the below code lines with the mentioned code lines.

Please find code in comment. 

Hope this answer helps you.

Thanks & Regards,
Email: odoo@aktivsoftware.com     

Skype: kalpeshmaheshwari

Avatar
Discard

Please find code here :-

Code lines to be replaced before:

'product_name': product.name,
'code': product.default_code,

Replace the code lines with:

'product_name': product.display_name,
'code': '',

Related Posts Replies Views Activity
2
Jan 23
2432
1
Oct 24
1328
1
Jun 23
8226
1
May 19
2707
1
Dec 17
4721