70c721e5a21659977ea58631a7c424a7e8555849
do_unreserve faster than ever
`do_unreserve` is a action that can be made in the tree view of `stock.picking` but it was very slow and not batched. For 80 picking with -/+ 10 `stock.move.line` related each (calculate on 5 sample of 80 pickings): It took 17947 +- 2741 SQL requests, 7.37 +- 1.09 sec of SQL and 8.13 +- 1.31 sec of python execution (+- 15.5 sec in total) Make some change to speed up the unreservation of multiple picking/move: - Batch the call of `_do_unreserve` of move in picking - Use OrderedSet instead of RecordSet to reduce the complexity of `_do_unreserve`. (Become significant when len(recordset) > 1000) - Add `.with_prefetch()` in the unlink of stock move line to patch issue with prefetching + unlink + cache. - Batch `_recompute_state` - Also batch the `do_unreserve` of MO Result after change in the same samples: It take now 1438 +- 20 SQL requests, 0.45 +- 0.02 sec of SQL and 0.68 +- 0.02 sec of python execution (+- 1.13 sec in total, 13 times faster). Note that the gain increase proportionally. task-2383111 closes odoo/odoo#62083 X-original-commit: e7a43655448db161150d0c62efa14c54ade0a2f6 Signed-off-by: Arnold Moyaux <amoyaux@users.noreply.github.com>
…
…
…
Odoo
Odoo is a suite of web based open source business apps.
The main Odoo Apps include an Open Source CRM, Website Builder, eCommerce, Warehouse Management, Project Management, Billing & Accounting, Point of Sale, Human Resources, Marketing, Manufacturing, ...
Odoo Apps can be used as stand-alone applications, but they also integrate seamlessly so you get a full-featured Open Source ERP when you install several Apps.
Getting started with Odoo
For a standard installation please follow the Setup instructions from the documentation.
To learn the software, we recommend the Odoo eLearning, or Scale-up, the business game. Developers can start with the developer tutorials
Languages
Python
49.6%
JavaScript
47.8%
SCSS
2%
CSS
0.3%
HTML
0.2%