Skip to Content
Menu
Musisz się zarejestrować, aby móc wchodzić w interakcje z tą społecznością.
To pytanie dostało ostrzeżenie
1 Odpowiedz
1977 Widoki

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?

Awatar
Odrzuć
Najlepsza odpowiedź

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

Awatar
Odrzuć

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': '',

Powiązane posty Odpowiedzi Widoki Czynność
2
sty 23
2528
1
paź 24
1479
1
cze 23
8303
1
maj 19
2769
1
gru 17
4811