[FIX] product: _get_image_variant is used for the field `image`

This revision is related to 93d4db9d1e.

Usually, for models with an image, the original `image` is stored
in the field `image`, and then the resized value are in the fields
`image_medium` & `image_small`.

In the specific case of the product variant, this is not the case,
the original image is stored in the field `image_variant`,
and the `image` field uses as well the method `_get_image_variant`.

The `image_get_resized_images` must therefore return the "big image"
as well, which is returned with the key `image`, by default.
This is done using the method argument `return_big`.
This commit is contained in:
Denis Ledoux 2015-11-30 13:46:33 +01:00
parent 44248a07a5
commit eb5d95b135
1 changed files with 1 additions and 1 deletions

View File

@ -962,7 +962,7 @@ class product_product(osv.osv):
if context.get('bin_size'):
result[obj.id] = obj.image_variant
else:
result[obj.id] = tools.image_get_resized_images(obj.image_variant, avoid_resize_medium=True)[name]
result[obj.id] = tools.image_get_resized_images(obj.image_variant, return_big=True, avoid_resize_medium=True)[name]
if not result[obj.id]:
result[obj.id] = getattr(obj.product_tmpl_id, name)
return result