diff options
| author | Arnold Moyaux <arm@odoo.com> | 2020-09-25 15:42:52 +0000 |
|---|---|---|
| committer | Arnold Moyaux <arm@odoo.com> | 2020-11-02 14:48:35 +0000 |
| commit | 59297235721b8c04cb4d8e24701e67c5ed2c7096 (patch) | |
| tree | e5ba7dcc830e610252f7ba9b9f9dd8ca666e0e59 /addons/web/static/src/js/fields/basic_fields.js | |
| parent | 904af21214a5a6924ec80b5690a523819aaec5f1 (diff) | |
[FIX] stock: perf run scheduler multi company
Usecase to reproduce:
- 10 company having 10 000 moves in state 'confirmed', 'partially_available'
- Run scheduler manually (without cron)
It will takes a huge amount of time.
It happens because the run scheduler wizard will call run_scheduler
as sudo for each company (passing company as arg).
run_scheduler will try to assign move that could be reserved. However
the domain in order to search move do not include the company_id and
search for every company.
Following upper usecase:
Instead of running action_assign 10 times on 10 000 moves, it will
run action_assign 10 times on 100 000 moves.
Databases with multi companies and having a lot of stock will have a
scheduler speedup from this patch.
Thanks "Rémy Voet <ryv@odoo.com>" for finding this issue.
opw-2328707
closes odoo/odoo#61175
X-original-commit: a21f9876b5b9d01380d03d638deb48cd091f26e7
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
