From f545db48b8711fe48b253331baa3f2495d1bb5ac Mon Sep 17 00:00:00 2001 From: "Andrea Grazioso (agr-odoo)" Date: Mon, 12 Jun 2023 09:42:35 +0000 Subject: [PATCH] [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) Signed-off-by: Grazioso Andrea (agr) --- addons/point_of_sale/models/pos_order.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/addons/point_of_sale/models/pos_order.py b/addons/point_of_sale/models/pos_order.py index d30661fc4f6..d1c41fd6c0d 100644 --- a/addons/point_of_sale/models/pos_order.py +++ b/addons/point_of_sale/models/pos_order.py @@ -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,