Wednesday, August 26, 2026
1 change · 19.0
Enhancements to existing features
Replenishment screens now load much faster for companies with many stock locations. The change improves how Odoo searches related warehouse locations, reducing delays from many seconds to under a second in the reported benchmark.
Original PR description
This [related PR] introduced a new recursive method of searching for descendant locations. However Postgres' default heuristic for planning recursive unions overestimates in this case and causes the planner to default to a simple SubPlan instead of a hashed SubPlan, blowing up the execution time. This commit introduces a LIMIT to the query to bound the estimate at the cardinality of the queried table, as explained in the code comment, to keep the SubPlan hashed up to ~300k total locations with default Postgres mem configurations. Related PR: https://github.com/odoo/odoo/pull/254245 Benchmark ----- `_read_group` when opening Replenishment, with 18 resupply locations and 30k total locations | |Query Exec Time| |------|---------------| |Before|24.5s | |After |0.3s | opw-6357118