summaryrefslogtreecommitdiff
path: root/addons/web/static/src/js/fields/basic_fields.js
diff options
context:
space:
mode:
authorSébastien Theys <seb@odoo.com>2019-02-13 16:26:09 +0000
committerSébastien Theys <seb@odoo.com>2019-02-15 08:52:26 +0000
commit5b32f1b5cdbe71301896b251b7a0a4b81601a46e (patch)
treedce205bbb9802c34618e631b132baf4f1bc4add1 /addons/web/static/src/js/fields/basic_fields.js
parentcc985a2bc4821f41afb1a5a70d809f86768218b2 (diff)
[FIX] product,(website_)sale: speed up _get_variant_for_combination
Change the domain to not include `.id` and to use `in` to prevent subqueries to be ran by the ORM for each attribute value. On the filter, directly use `attribute_value_ids` instead of the computed field `product_template_attribute_value_ids` that leads to the same result, to prevent unnecessary compute of that non-stored field. Cache the result of the method. The cache is invalidated when the configuration of attributes and values change. We can remove all cache invalidation from the tests since it is done at the appropriate times in the business code now. opw-1923999 task-1922055 PR: #30274
Diffstat (limited to 'addons/web/static/src/js/fields/basic_fields.js')
0 files changed, 0 insertions, 0 deletions