summaryrefslogtreecommitdiff
path: root/addons
diff options
context:
space:
mode:
authorVictor Feyens <vfe@odoo.com>2019-12-19 16:00:09 +0000
committerVictor Feyens <vfe@odoo.com>2019-12-19 18:08:55 +0000
commit5015e718fb2d677976d8cd4e916fe264b5a5984d (patch)
treeee944addf51e70e5f10fb4f83eec3cd92bfe2ac2 /addons
parentfebd360ff0be1c812b6bfdfa96a99eae4448b610 (diff)
[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) <vfe@odoo.com>
Diffstat (limited to 'addons')
-rw-r--r--addons/sale/models/sale.py7
1 files 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