From c418d73445da7ab2acb591e637921643c2ed35b2 Mon Sep 17 00:00:00 2001 From: Xavier Morel Date: Wed, 11 Oct 2017 11:57:02 +0200 Subject: [PATCH] [FIX] product: image update in variants Fixes #19945 --- addons/product/models/product.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/addons/product/models/product.py b/addons/product/models/product.py index 974c1eeeb5b..b854925701e 100644 --- a/addons/product/models/product.py +++ b/addons/product/models/product.py @@ -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