summaryrefslogtreecommitdiff
path: root/addons
diff options
context:
space:
mode:
authorsnd <snd@odoo.com>2019-05-08 09:21:43 +0000
committersnd <snd@odoo.com>2019-05-13 12:32:41 +0000
commitf4748c28f7e5ad126434d179cd3f9bae00cad547 (patch)
treefcd37f22c318019ff5c83b1822683819dc09e22a /addons
parentc545783b95b15f65a9798003b614f75685dc434e (diff)
[FIX] product: correct bug where variants can't change image
When you import a variant or when you archive variants to only leave one tied to the template, the image of the variant can't be changed. If the variant has a picture and you archive all the other variants, when you change the image on the variant, it's the template image which is modified. opw 1974727
Diffstat (limited to 'addons')
-rw-r--r--addons/product/models/product.py1
1 files changed, 1 insertions, 0 deletions
diff --git a/addons/product/models/product.py b/addons/product/models/product.py
index 6f80b4174f9..9bccf02fabc 100644
--- a/addons/product/models/product.py
+++ b/addons/product/models/product.py
@@ -287,6 +287,7 @@ class ProductProduct(models.Model):
if self.product_tmpl_id.image and self.product_variant_count > 1:
self.image_variant = image
else:
+ self.image_variant = False
self.product_tmpl_id.image = image
@api.depends('product_tmpl_id', 'attribute_value_ids')