Tuesday, January 12, 2021
1 change · master
Enhancements to existing features
Inventory valuation accounting entries are now created and posted in batches instead of one at a time. This significantly reduces the time needed to process large inventory adjustments for automatically valued products, improving operational efficiency during stock corrections.
Original PR description
## Context 5300 layers having a negative `remaining_value` (as well as negative `remaining_qty`) on fifo automated products ## Test Validate an inventory adjustment to set quantities to 0. Please find below the metrics | | Before the patch | After the patch | |---|---|---| |100 products | 2000 sec | 90 sec | |1 product | 132 sec | 25 sec | On following flamegraphs, we can see the account move creation (bloc **1**) decreases significantly while the `_run_fifo_vacuum` (bloc **2**) takes more time inside the complete transaction as the batch is done *per*-product ### Before the patch :  ### After the patch : 