Thursday, November 20, 2025
1 change · saas-18.2
Enhancements to existing features
Delivery lookup for stock lots has been optimized to handle large batches much faster. This reduces waiting time when working with many tracked products or lots, improving operational efficiency in inventory workflows.
Original PR description
### Description: This refactoring replaces the recursive calculation in `_find_delivery_ids_by_lot` with an iterative process. This change significantly reduces the amount of database queries by prefetching and batching all required lines in a single pass, and it also eliminates the overhead caused by repeated recursive function calls. ### Benchmark: | Total Lots | Before | After | |------------|--------|--------| | 69 | 1 sec | 106 ms | | 1152 | 1 min | 5 sec | ### Reference: opw-5096599 Forward-Port-Of: odoo/odoo#233478