Skip to content

Commit

Permalink
product_configurator_sale: Show custom values in sale line
Browse files Browse the repository at this point in the history
  • Loading branch information
SirAionTech authored and Chirag-OSI committed Feb 20, 2024
1 parent 9d0dc49 commit db5132e
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions product_configurator_sale/models/sale.py
Original file line number Diff line number Diff line change
Expand Up @@ -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

0 comments on commit db5132e

Please sign in to comment.