Monday, September 8, 2025
1 change · 17.0
Enhancements to existing features
Inventory and manufacturing product availability searches are optimized for databases with many products. This reduces wait times when filtering or reporting on available, incoming, outgoing, and forecast stock quantities, especially at larger scale.
Original PR description
The performance when searching by `qty_available`, `virtual_available`, `free_qty`, `incoming_qty`, or `outgoing_qty` on databases with a large number of `product.product`s is currently poor. This is part of a two-part fix with #224031 Both `product.product.type` and `product.product.uom_id` are computed from `product_tmpl_id`. With large databases, `_compute_related()` is a large bottleneck when running `_compute_quantities()` We fix this performance issue by directly fetching the fields instead. Benchmark (with #224031 applied) | `product.product` count | Before this PR | After this PR | | ----------------------- | ----------- | ---------- | | 5,000 | 1.01s | 0.67s | | 50,000 | 9.97s | 5.87s | | 500,000 | 144s | 78s | opw-4930856