[FIX] product: image update in variants

Fixes #19945
This commit is contained in:
Xavier Morel
2017-10-11 11:59:16 +02:00
parent 4cdc1f4df2
commit c418d73445
+2
View File
@@ -261,6 +261,8 @@ class ProductProduct(models.Model):
@api.one
def _set_image_value(self, value):
if isinstance(value, pycompat.text_type):
value = value.encode('ascii')
image = tools.image_resize_image_big(value)
if self.product_tmpl_id.image:
self.image_variant = image