Skip to Content
Menu
You need to be registered to interact with the community.
This question has been flagged
1 Odgovori
2031 Prikazi

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
Opusti
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
Opusti

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 Odgovori Prikazi Aktivnost
2
jan. 23
2585
1
okt. 24
1521
1
jun. 23
8363
1
maj 19
2833
1
dec. 17
4899