From 5015e718fb2d677976d8cd4e916fe264b5a5984d Mon Sep 17 00:00:00 2001 From: Victor Feyens Date: Thu, 19 Dec 2019 16:00:09 +0000 Subject: [PATCH] [FIX] sale: variant attribute description partially duplicated. Since the name updates are done in onchanges, the relational values may be newIds and therefore we have to use their _origin for comparisons. closes odoo/odoo#42217 X-original-commit: 9c303bfd4f8eeb1c6892349c59f70347a11ff71f Signed-off-by: Victor Feyens (vfe) --- addons/sale/models/sale.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/addons/sale/models/sale.py b/addons/sale/models/sale.py index 5fce56f0fa1..071e145a662 100644 --- a/addons/sale/models/sale.py +++ b/addons/sale/models/sale.py @@ -1704,11 +1704,12 @@ class SaleOrderLine(models.Model): name = "\n" - custom_values = self.product_custom_attribute_value_ids.custom_product_template_attribute_value_id + custom_ptavs = self.product_custom_attribute_value_ids.custom_product_template_attribute_value_id + no_variant_ptavs = self.product_no_variant_attribute_value_ids._origin # display the no_variant attributes, except those that are also - # displayed by a custom (avoid duplicate) - for ptav in (self.product_no_variant_attribute_value_ids - custom_values): + # displayed by a custom (avoid duplicate description) + for ptav in (no_variant_ptavs - custom_ptavs): name += "\n" + ptav.display_name # display the is_custom values