[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) <vlst@odoo.com> Signed-off-by: Robin Engels (roen) <roen@odoo.com>
This commit is contained in:
@@ -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()
|
||||
|
||||
Reference in New Issue
Block a user