[FIX] point_of_sale: duplicate internal reference in invoice

Have a product with internal reference
Open POS session
Create an order with the product
Invoice

Issue: Internal reference is shown twice on the invoice line

opw-3343170

closes odoo/odoo#125293

X-original-commit: 4fbcbd2bb04b35635db7903648ba7c39c41c2dad
Signed-off-by: Joseph Caburnay (jcb) <jcb@odoo.com>
Signed-off-by: Grazioso Andrea (agr) <agr@odoo.com>
This commit is contained in:
Andrea Grazioso (agr-odoo)
2023-06-16 12:18:50 +02:00
parent 1539462a34
commit f545db48b8
+1 -2
View File
@@ -197,8 +197,7 @@ class PosOrder(models.Model):
order.add_payment(return_payment_vals)
def _prepare_invoice_line(self, order_line):
display_name = order_line.product_id.get_product_multiline_description_sale()
name = order_line.product_id.default_code + " " + display_name if order_line.product_id.default_code else display_name
name = order_line.product_id.get_product_multiline_description_sale()
return {
'product_id': order_line.product_id.id,
'quantity': order_line.qty if self.amount_total >= 0 else -order_line.qty,