Thursday, August 21, 2025
8 changes · saas-18.3
Enhancements to existing features
Accounting now has helpers to spread global discounts and returned merchandise across invoice lines for electronic invoicing. This helps country-specific formats such as Mexico's CFDI report discounts more accurately per product line instead of as one separate discount line.
Original PR description
This commit also adds a new helper '_dispatch_global_discount_lines' that can be used to split the global discount lines across the others base lines. That way in EDI like Mexico, the global discount can be reported line by line as a discount per line and no longer a big discount applied on a single line. There is also another helper '_dispatch_return_of_marchandise_lines' that allows to dispatch negative lines using the quantity. For example, if you buy 3 times the same product but one is returned because broken, you will end up with a sell of 2 products instead of 3 but having a discount of 33.33%. This makes the difference when generating the mexican CFDI. --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
Stock transfers with many serial-numbered items now validate much faster by grouping the creation of related stock movement records. This reduces timeouts and improves reliability for high-volume warehouse operations.
Original PR description
### Description: When using serial numbers, pickings with many move lines can cause performance issues during validation. This is due to `_update_reserved_quantity` updating quantities and creating move lines individually. By moving the creation outside `_update_reserved_quantity`, we can batch create move lines per move, significantly improving performances. ### Benchmark: | N° of mls | Before | After | |-----------|---------|-------| | 500 | 1:37 | 1:34 | | 15000 | Timeout | 3:30 | | 30000 | Timeout | 4:29 | ### Reference: opw-4889581 Forward-Port-Of: odoo/odoo#223420 Forward-Port-Of: odoo/odoo#219471
Accounting entries and expense-related records now keep a direct link to their related attachments instead of repeatedly searching for them. This improves performance when viewing or processing records with linked documents, especially in expense workflows.
Original PR description
In the enterprise PR, we had to do a search for each move_line to get his attachment which was really poor in terms of performance. To solves that we added a one2many field in each model that are linked to the move_line. The return function that will give the attachment can be overwritten by other module like expense no task id --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
Sales orders with many lines now load faster when PDF quote builder product documents are available. The update reduces repeated database lookups, cutting the related query time from about 252 ms to about 13 ms in the reported benchmark.
Original PR description
Replace search in for loop with `_read_group` and a precomputed dictionary of available product documents Description of the issue/feature this PR addresses: Performance issue when opening SO with multiple lines (more than 100). See Speedscope before [speedscope_before.json](https://github.com/user-attachments/files/21251034/speedscope_before.json) <img width="1920" height="659" alt="image" src="https://github.com/user-attachments/assets/e77bec12-e8cf-4cc9-b3d2-90ad59db6fa3" /> And after: [speedscope_after.json](https://github.com/user-attachments/files/21251096/speedscope_after.json) <img width="1911" height="404" alt="image" src="https://github.com/user-attachments/assets/e1663ec3-2918-451d-ae25-6103d8a75eff" /> We went from 252ms for the query only to 12.63ms. --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#220613 Forward-Port-Of: odoo/odoo#219229
The Point of Sale screen now displays the standard Odoo Point of Sale icon in the browser tab. This makes the POS tab easier to recognize and keeps it visually consistent with the rest of Odoo.
Original PR description
Before this commit: ==================== The POS UI did not display a favicon in the browser tab. After this commit: ================== The standard Odoo Point of Sale favicon is now displayed in the browser tab for the POS UI, consistent with the backend interface. Task-4978320 Forward-Port-Of: odoo/odoo#223528
UAE payroll calculations now include days when an employee is outside their contract period. This helps payroll teams produce more accurate payslips by reflecting non-contract days directly in the relevant salary rules.
Original PR description
days to UAE payroll task-4700453 Forward-Port-Of: odoo/enterprise#84758
Mexican electronic invoicing now allocates discounts on negative or refund lines more consistently, including point-of-sale invoices. This helps produce compliant invoice XML amounts and reduces errors in complex discount and refund scenarios.
Opening the bank reconciliation widget is now faster because attachment information is gathered more efficiently. Users should experience improved responsiveness when working with bank statement lines that have related documents.
Original PR description
This commit will remove the search in the loop that was present and was causing some performance issues when opening the bank reconciliation widget. To solved that we added a function that will get thanks to some one2many field the attachments linked to the move, statement line, payment and expense no task id