Nicolas Martinelli
authored
When the carousel is activated, the following will load all variant ids in the cache (cf. `_in_cache_without`): ``` <t t-set="variant_img" t-value="any(product.mapped('product_variant_ids.image_variant'))"/> ``` When accessing the `image` field at: ``` <div t-if="variant_img" class="..." itemprop="image" t-field="product.product_variant_id.image" t-options="..."/> ``` All variants in cache will have their image resized by the method `_compute_images` on `product.product`. In case of a product with hundreds of variants with images, this will take a major amount of time. If we replace by `product[:1]`, the system uses another cache, and doesn't fetch the image of all variants. opw-1844783
Name | Last commit | Last update |
---|