Daily updates from Odoo
Wednesday, August 22, 2018
1 change
Code cleanup and technical improvements
Inventory updates that reduce product quantities to zero now handle cleanup more efficiently. This significantly reduces processing time for large inventory adjustments, helping teams complete stock corrections faster and with less system slowdown.
Original PR description
It is possible that a call to `_action_done` will unlink a quant. This happens when moving a product from a location to another one and makes null the quantity of this product in one of theses locations. In this case, we unlink the quant because it is now useless and could be confusing on reports based on quants. The unwanted side effect is that unlinking a record will invalidate the cache. In some pathologic cases, like making an inventory adjustment of 600 products and reseting their quantity back to 0, the time of the operation is around 15 minutes. With this patch that tries to work carefully with the cache invalidation, the same operations takes around 40 seconds. Description of the issue/feature this PR addresses: Current behavior before PR: Desired behavior after PR is merged: -- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr