From db5132e5f3eed3e059ead04573522dbb0686963e Mon Sep 17 00:00:00 2001 From: Simone Rubino Date: Thu, 18 Jan 2024 10:58:12 +0100 Subject: [PATCH] product_configurator_sale: Show custom values in sale line --- product_configurator_sale/models/sale.py | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/product_configurator_sale/models/sale.py b/product_configurator_sale/models/sale.py index 07f3b7ba77..95d795c1d6 100644 --- a/product_configurator_sale/models/sale.py +++ b/product_configurator_sale/models/sale.py @@ -69,3 +69,18 @@ def _compute_price_unit(self): else: result = super(SaleOrderLine, line)._compute_price_unit() return result + + def _get_sale_order_line_multiline_description_variants(self): + name = "" + for line in self: + custom_values = line.custom_value_ids + if custom_values: + name += "\n" + "\n".join( + [f"{cv.display_name}: {cv.value}" for cv in custom_values] + ) + else: + name += super( + SaleOrderLine, + line, + )._get_sale_order_line_multiline_description_variants() + return name