From 70f7448d4587828d6aeb19dc58eb91955c4b113a Mon Sep 17 00:00:00 2001 From: roen-odoo Date: Mon, 6 Nov 2023 17:18:26 +0000 Subject: [PATCH] [FIX] pos_sale: use display_name instead of name when settling orders Current behavior: If a product had a sales description, it was displayed in the order when settling it from a sale order. But only the name should be displayed in the PoS. Steps to reproduce: - Create a product with a sales description - Create a sale order with this product - Go to the PoS and settle the order from the sale order - The name of the product is name + sales description instead of just the name. opw-3547814 closes odoo/odoo#143241 X-original-commit: 2afb8dc80eccb2ba6c9d20982f0e869f5bde2397 Signed-off-by: Vlad Stroia (vlst) Signed-off-by: Robin Engels (roen) --- addons/pos_sale/models/sale_order.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/pos_sale/models/sale_order.py b/addons/pos_sale/models/sale_order.py index b69e26bf154..61130bde75a 100644 --- a/addons/pos_sale/models/sale_order.py +++ b/addons/pos_sale/models/sale_order.py @@ -52,7 +52,7 @@ class SaleOrderLine(models.Model): sale_line.qty_invoiced += sum([self._convert_qty(sale_line, pos_line.qty, 'p2s') for pos_line in sale_line.pos_order_line_ids], 0) def _get_sale_order_fields(self): - return ["product_id", "name", "price_unit", "product_uom_qty", "tax_id", "qty_delivered", "qty_invoiced", "discount", "qty_to_invoice", "price_total"] + return ["product_id", "display_name", "price_unit", "product_uom_qty", "tax_id", "qty_delivered", "qty_invoiced", "discount", "qty_to_invoice", "price_total"] def read_converted(self): field_names = self._get_sale_order_fields()