Friday, April 24, 2026
1 change · saas-19.1
Enhancements to existing features
This update optimizes how Odoo handles product pricing rules, specifically for businesses with many products and price lists. The previous process was slow and prone to errors when dealing with large datasets, but this change dramatically improves performance and prevents timeouts. It achieves this by intelligently querying data, reducing unnecessary calculations and memory usage.
Original PR description
The _check_pricelist_recursion constraint could cause performance issues when iterating over full recordsets or repeatedly querying large datasets.
Refactor the recursion logic to traverse pricelists as a graph (DFS on pricelist pairs) and replace item-level iteration with a targeted _read_group query to fetch only relevant pricelist-based rules:
- pricelist_id
- base = 'pricelist'
Avoid redundant path evaluations by tracking visited pricelist pairs.
This ensures that only necessary records are fetched and processed, significantly reducing memory usage and avoiding timeout issues on large datasets.
opw-6099182
Forward-Port-Of: odoo/odoo#259310