diff options
| author | Denis Ledoux <dle@odoo.com> | 2019-02-13 12:39:40 +0000 |
|---|---|---|
| committer | Denis Ledoux <dle@odoo.com> | 2019-02-13 12:52:48 +0000 |
| commit | 5ebcd188f3c6f2e5bf39c7eb6594ec5c9398bb5f (patch) | |
| tree | 4d3d303053e0b970f032102f831020470f64ecc9 /addons/base_import_module | |
| parent | f221936f8b9e64d371c2593210797b36ef6d032c (diff) | |
[FIX] stock: improve performance of product quantity search
Calling `search` on `product.product` without specifying an order
will sort the products by name.
As the product name is a translatable field,
it requires to make a join on the translation table to sort
the product by their translated name.
This join is costly, and in this case it was completely
irelevant to do it, as the goal was simply to compute
a domain with only a list of product ids, for which
the order simply did not matter.
By forcing the order on the id,
we avoid the sort on the product name,
and therefore the join on the translation.
The performance is therefore improved.
opw-1930010
closes odoo/odoo#31066
Diffstat (limited to 'addons/base_import_module')
0 files changed, 0 insertions, 0 deletions
