From 45be64431972de5ae367dad24db4be8512e81e7f Mon Sep 17 00:00:00 2001 From: roen-odoo Date: Thu, 6 Apr 2023 16:25:01 +0000 Subject: [PATCH] [FIX] point_of_sale: Add sales description to pos invoice Current behavior: If you add a sale description to a product, it will not be added to the invoice created from the PoS. Steps to reproduce: - Add a sale description to a product - Create a PoS order with this product - Create an invoice from the PoS order - The sale description is not added to the invoice opw-3221481 closes odoo/odoo#119516 X-original-commit: 37538c876f30fb1b3a9368f12a16edb1806777f8 Signed-off-by: Joseph Caburnay (jcb) Signed-off-by: Heinz Robin (rhe) Signed-off-by: Engels Robin (roen) --- addons/point_of_sale/models/pos_order.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/addons/point_of_sale/models/pos_order.py b/addons/point_of_sale/models/pos_order.py index cf5dcbed779..0895abdfc21 100644 --- a/addons/point_of_sale/models/pos_order.py +++ b/addons/point_of_sale/models/pos_order.py @@ -196,12 +196,14 @@ 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 return { 'product_id': order_line.product_id.id, 'quantity': order_line.qty if self.amount_total >= 0 else -order_line.qty, 'discount': order_line.discount, 'price_unit': order_line.price_unit, - 'name': order_line.product_id.display_name or order_line.full_product_name, + 'name': name, 'tax_ids': [(6, 0, order_line.tax_ids_after_fiscal_position.ids)], 'product_uom_id': order_line.product_uom_id.id, }