From 89ede9b576359f774a25a0137986de2cd3d4e633 Mon Sep 17 00:00:00 2001 From: Goffin Simon Date: Wed, 25 Mar 2020 09:57:39 +0000 Subject: [PATCH] [FIX] product: Duplicating attribute Steps to reproduce the bug: - Let's consider an attribute A with two values V1 and V2 - Let's consider a product P with V1 and V2 as attributes - Duplicate A Bug: P was associated with 4 attributes V1, V1, V2 and V2 opw:2219540 closes odoo/odoo#48342 X-original-commit: 1c44aeb7d1734cd7a6dbdb80971f98553c67003b Signed-off-by: Simon Goffin (sig) --- addons/product/models/product_attribute.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/product/models/product_attribute.py b/addons/product/models/product_attribute.py index ede2fe40d95..07202a64993 100644 --- a/addons/product/models/product_attribute.py +++ b/addons/product/models/product_attribute.py @@ -91,7 +91,7 @@ class ProductAttributeValue(models.Model): help="The attribute cannot be changed once the value is used on at least one product.") pav_attribute_line_ids = fields.Many2many('product.template.attribute.line', string="Lines", - relation='product_attribute_value_product_template_attribute_line_rel') + relation='product_attribute_value_product_template_attribute_line_rel', copy=False) is_used_on_products = fields.Boolean('Used on Products', compute='_compute_is_used_on_products') _sql_constraints = [