diff options
| author | Rémy Voet (ryv) <ryv@odoo.com> | 2020-11-23 12:17:12 +0000 |
|---|---|---|
| committer | Rémy Voet (ryv) <ryv@odoo.com> | 2020-11-30 14:39:59 +0000 |
| commit | b2d57323caf9f7fe47c4fe9ac26b0e955d9987b9 (patch) | |
| tree | 5d3cf5457d3a0f6bade4cf9d07f4f30e76bf0011 /addons/web/static/src/js/fields/basic_fields.js | |
| parent | e78ca55997dfbf13c0798c1f59408450071e1452 (diff) | |
[FIX] stock: avoid flush all env in quants update
Issue:
The `_update_available_quantity` will flush the all environment due to
the savepoint (at each call). When we working with the package,
it becomes bottleneck due to the `_compute_package_info`. Indeed,
it computes two compute store field (`location_id` and `company_id`) and
depends of multiple field of related quants `quants_ids.xxx`. It means
that each time we enter/exit in the savepoint to update quants, this
compute will be execute (because of flush + compute_store).
Solution:
Avoid flushing when enter in the savepoint of
`_update_available_quantity` (`flush=False`)
Performance gain:
To validate a Delivery with 1000 move lines with package (source and
dest):
- Without patch: +- 120 sec
- With patch: +- 17 sec
opw-2371161
closes odoo/odoo#62178
Signed-off-by: Arnold Moyaux <amoyaux@users.noreply.github.com>
Diffstat (limited to 'addons/web/static/src/js/fields/basic_fields.js')
0 files changed, 0 insertions, 0 deletions
