diff options
| author | Goffin Simon <sig@odoo.com> | 2020-03-25 09:57:39 +0000 |
|---|---|---|
| committer | Goffin Simon <sig@odoo.com> | 2020-03-25 12:12:23 +0000 |
| commit | 89ede9b576359f774a25a0137986de2cd3d4e633 (patch) | |
| tree | 37f1dcc099fc6606bb3c02e91a3447aa3a133c21 /addons/product | |
| parent | 71e163be9bf50e06699ca9e94b25938f18a6918f (diff) | |
[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) <sig@openerp.com>
Diffstat (limited to 'addons/product')
| -rw-r--r-- | addons/product/models/product_attribute.py | 2 |
1 files changed, 1 insertions, 1 deletions
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 = [ |
