summaryrefslogtreecommitdiff
path: root/addons/web/static/tests/fields/basic_fields_tests.js
diff options
context:
space:
mode:
authorSébastien Theys <seb@odoo.com>2019-02-13 16:26:12 +0000
committerSébastien Theys <seb@odoo.com>2019-02-15 10:17:03 +0000
commit956b5cafdb9b67b429902c12da863b66b0df5616 (patch)
tree813c7b810c3c24401b22d61fd57ccb3206b4d0f3 /addons/web/static/tests/fields/basic_fields_tests.js
parent5b32f1b5cdbe71301896b251b7a0a4b81601a46e (diff)
[FIX] product, website_sale(_*): show only template data on /shop
In order to increase performance, it was decided to avoid computing the first combination on the /shop page, because it has to be done for many products in a loop. Instead, we only display the template data, which is faster to get. This implies that when using only one variant, we need to always write on the template image instead of the variant image. This is needed because when there is only one variant, the user doesn't know there is a difference between template and variant, he expects both images to be the same. To achieve this, we also had to change how the quick buttons work on the /shop page ("add to cart", "add to wishlist" and "add to compare"). Indeed it was decided that their behavior should be the same, no matter how many combinations existed or not on the template. Therefore, the standard behavior of those buttons is to always do their action on the first possible variant, that is cached so we can use this logic without ever needing to read anything else than the template data (and the cache). opw-1923999 task-1922055 PR: #30274
Diffstat (limited to 'addons/web/static/tests/fields/basic_fields_tests.js')
0 files changed, 0 insertions, 0 deletions