summaryrefslogtreecommitdiff
path: root/odoo/modules
diff options
context:
space:
mode:
authorNicolas Martinelli <nim@odoo.com>2018-05-31 15:30:40 +0200
committerNicolas Martinelli <nim-odoo@users.noreply.github.com>2018-06-01 09:00:26 +0200
commit195c2fc05f2a2ff4f80bd49066803974519d5a9b (patch)
treef72cc50f1bfc055a4e8c268cfc55c6713eedec95 /odoo/modules
parent074ec1aeae281405d998406819808795e4e6c406 (diff)
[FIX] website_sale: performance with carousel
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
Diffstat (limited to 'odoo/modules')
0 files changed, 0 insertions, 0 deletions