Tuesday, December 16, 2025
2 changes · saas-18.4
Enhancements to existing features
This update enhances the way Odoo calculates order amounts by allowing custom addons to modify the list of order lines used. Previously, this process was fixed, now it's more flexible, enabling developers to tailor order amount calculations to specific business needs. This improves the adaptability of the sales order system.
Original PR description
This allows to change the record set of order lines which are used by `sale.order` `_compute_amounts` by custom addons Forward-Port-Of: odoo/odoo#239928 Forward-Port-Of: odoo/odoo#233239
This update optimizes how translations are imported into Odoo, addressing a previous issue that caused large memory usage and potential errors. By focusing only on updated translations and simplifying the import query, the system now handles frequent updates more efficiently and reliably.
Original PR description
Before this commit, when importing the translations with the TranslationImporter object, the save method was building one big query per model, with each JSON object containing all the languages. On our server, where 36 languages are installed, this leads to big JSON objects, especially for some large mail templates. Recently, we even got MemoryErrors because of the soft memory limit being hit. The query was about 250MB long. In the function, we already have the current values, so it's easy to compare them to the new values, and only consider these in the query. Furthermore, there is no need to add the languages that aren't being updated. With this commit, we are building a slightly more complicated query, but it will receive much less data when the translations are updated frequently, as unchanged values will be ignored. Task-id: none Forward-Port-Of: odoo/odoo#239678