Monday, May 27, 2024
1 change
Enhancements to existing features
This update significantly speeds up the process of cancelling large purchase orders. Previously, cancelling orders with over 50 lines would take several minutes or timeout; now the same operations complete in seconds. This improvement makes it practical for users to manage and cancel large orders without experiencing system delays.
Original PR description
# Current behavior: Cancelling a Purchase Order with more than 50 lines takes too much time to be processed. In the case of the client they had PO with more than 200 lines which makes it impossible for them to cancel them. # Step to reproduce: - Install mrp and mrp_subcontracting - Create PO with more than 50 order lines or more - Confirm the PO - Try to cancel it - Take a long time or timeout # Benchmark (made in 16): | No. of PO lines | Before | After | |-----------------|:-------:|:------:| | 9 | 650ms | 600ms | | 91 | 1min26 | 9s | | 273 | 4min50 | 34s | | 405 | 7min13 | 55s | # Fix: Batch more actions and records to reduce the number of queries generated by the ORM. # Reference: opw-3690875 Forward-Port-Of: odoo/odoo#166513 Forward-Port-Of: odoo/odoo#151526