Wednesday, June 19, 2024
1 change · saas-17.1
Enhancements to existing features
Point of Sale now loads product and price list information much more efficiently, especially for stores with large catalogs. This reduces waiting time when opening POS sessions and improves daily checkout readiness for larger deployments.
Original PR description
Add raw data directly to each records themselves, instead of storing them in a separate object. This way, we avoid having verify if the raw data exists in the main object, we can directly access it. This commit also include a backport of https://github.com/odoo/odoo/pull/168466, commit message: Before this commit, loading the POS took a long time when there were more than 1000 products and pricelists. The reason was that the `computeProductPricelistCache` function had a time complexity of O(n^2 * m) due to nested loops over products and pricelist items, and several calls to the raw function which is O(n) itself. This commit optimizes the `computeProductPricelistCache` function by performing a single loop over pricelist items and another over products. This change improves the loading speed from 10 minutes to 10 seconds with 1000 products and pricelist items.