Thursday, August 21, 2025
18 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
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
Resolved issues and error corrections
The Attendance overview list now shows employees only when they have matching attendance records. This avoids clutter and makes grouped attendance reports easier for HR teams to read, while preserving the existing Gantt view behavior.
Original PR description
To reproduce: ============= - Activate the "Attendances" app. - Go to Attendances > Overview. - Switch to list view. - Group by Employee. Issue: ====== The current domain fetches all employees…
To reproduce: ============= - Activate the "Attendances" app. - Go to Attendances > Overview. - Switch to list view. - Group by Employee. Issue: ====== The current domain fetches all employees matching the filter, regardless of whether they have attendance entries in the grouped model. https://github.com/odoo/odoo/blob/5b5f0bf795ca538e91f063f2b3185c12b1d0a992/addons/hr_attendance/models/hr_attendance.py#L677 Fix: ==== Restrict the employee list to only those linked to a resource that appears in the grouped data https://github.com/odoo/odoo/blob/5b5f0bf795ca538e91f063f2b3185c12b1d0a992/odoo/models.py#L2360-L2361 The problem is the behavior of gantt view will change it's behavior So we have to applied only to the list. there's something unique when we call it from the gantt which is `gantt_start_date` property that we will use it so we can differentiate between list and gantt view -- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#223594 Forward-Port-Of: odoo/odoo#223181
Online-paid self-order POS orders are now sent to the preparation display, matching the behavior of terminal-paid orders. This prevents kitchen or preparation teams from missing orders that customers already paid for online.
Original PR description
After this pr: https://github.com/odoo/odoo/pull/213493 the orders were not sent to the preparation display if the order was payed with and online payment method. This commit add the same logic as the terminal payments to send the order to the preparation display. Description of the issue/feature this PR addresses: Current behavior before PR: Desired behavior after PR is merged: --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
Fixes an issue where payment methods set up in a parent company were not visible when viewing a contact from a child branch. This ensures branch users can see and use the expected payment details without switching company context.
Original PR description
In this bug, the payment method is not shown in the child branch. To reproduce: 1- Create a db with account and contact app installed 2- Create a company and a branch 3- Create a payment method in parent company and add it to contact form of a partner 4- Go to child branch. You can see the payment method is not shown in the contact form. opw-4920219 Forward-Port-Of: odoo/odoo#223598 Forward-Port-Of: odoo/odoo#219448
This update refreshes Odoo Spreadsheet with several fixes that improve everyday reliability. It corrects chart exports to Excel, avoids duplicate pasted content from the clipboard, prevents inconsistent table row moves, and restores pivot data properly after undoing deletions.
Original PR description
### Contains the following commits: https://github.com/odoo/o-spreadsheet/commit/ab02b0cb9 [REL] 18.3.17 [Task: 0](https://www.odoo.com/odoo/2328/tasks/0)…
### Contains the following commits: https://github.com/odoo/o-spreadsheet/commit/ab02b0cb9 [REL] 18.3.17 [Task: 0](https://www.odoo.com/odoo/2328/tasks/0) https://github.com/odoo/o-spreadsheet/commit/0d2a01e6c [FIX] xlsx: correctly export aggregated charts [Task: 4954426](https://www.odoo.com/odoo/2328/tasks/4954426) https://github.com/odoo/o-spreadsheet/commit/4d2398b70 [FIX] clipboard: don't paste both image and text content [Task: 4876682](https://www.odoo.com/odoo/2328/tasks/4876682) https://github.com/odoo/o-spreadsheet/commit/7f80875f3 [FIX] selection: prevent partial move of table rows with headers [Task: 4862731](https://www.odoo.com/odoo/2328/tasks/4862731) https://github.com/odoo/o-spreadsheet/commit/64cf69dc0 [FIX] pivot: reload when delete is undone [Task: 5001153](https://www.odoo.com/odoo/2328/tasks/5001153) Co-authored-by: Anthony Hendrickx (anhe) <anhe@odoo.com> Co-authored-by: Alexis Lacroix (laa) <laa@odoo.com> Co-authored-by: Lucas Lefèvre (lul) <lul@odoo.com> Co-authored-by: Dhrutik Patel (dhrp) <dhrp@odoo.com> Co-authored-by: Adrien Minne (adrm) <adrm@odoo.com> Co-authored-by: Ronak Mukeshbhai Bharadiya <rmbh@odoo.com> Co-authored-by: Florian Damhaut (flda) <flda@odoo.com> Co-authored-by: Rémi Rahir (rar) <rar@odoo.com> Co-authored-by: Pierre Rousseau (pro) <pro@odoo.com> Co-authored-by: Vincent Schippefilt (vsc) <vsc@odoo.com>
This fixes cases where files could be acted on before their upload was fully recognized, which could cause attachments to delete without confirmation or block messages from sending. It improves reliability when adding files in chat, messaging, live chat, and course review workflows.
Original PR description
\* = im_livechat, website_slides Not waiting for the uploading state to be resolved can lead to unexpected behavior, such as deleting the attachment immediately when clicking on the delete button rather than showing the confirm dialog. This might also prevent the composer from being sent if the attachment is still uploading. This is checked when checking the enabled state of the send button when clicking on it, but it is not checked when pressing enter directly. Some tests also checked uploading was finished but didn't target the correct attachment. https://runbot.odoo.com/odoo/error/230901 https://github.com/odoo/enterprise/pull/92620 Forward-Port-Of: odoo/odoo#223464 Forward-Port-Of: odoo/odoo#223367
Shared Microsoft Office documents now keep the correct file type instead of being treated as ZIP files. This lets portal users open and work with documents in Odoo features such as spreadsheets without file type errors.
Original PR description
Issue: Inconsistent mimetype vs filename for documents shared by portal users. 1. Share a ms office document logged in as a portal user. 2. filename is correct, but mimetype is `application/zip`. 3.…
Issue: Inconsistent mimetype vs filename for documents shared by portal users. 1. Share a ms office document logged in as a portal user. 2. filename is correct, but mimetype is `application/zip`. 3. User can't interact with the file to open the file in the Odoo spreadsheet because the mimetype is zip. <img width="387" height="192" alt="image" src="https://github.com/user-attachments/assets/be31f05f-e4e3-44d9-b12a-66f96feba950" /> <img width="274" height="67" alt="image" src="https://github.com/user-attachments/assets/93064e5c-c028-41ce-8e79-1b9c9447c018" /> With `fix_filename_extension()`, the following two commits fixed the issue of Odoo's `guess_mimetype` function incorrectly guessing extensions such as `.xlsx` as `.zip` extension. https://github.com/odoo/odoo/commit/8842b6b43e7c3d1cc67d7d399bb210e4009e23b2 https://github.com/odoo/odoo/commit/34d9375e2efb604f8e7036cb710f44b01f9ccaee However, the `_from_request_file()` still uses the incorrectly guessed mimetype to create an attachment, leading to inconsistent extension from the filename (.xlsx) vs attachment record's mimetype (.zip). This commit fixes the issue by using the mimetype from the filename's extension. This is safe if the following assumption is correct: At the point where the `from_request_file()` attempts to create the attachment record, the `filename` contains correct extension name, presumably fixed by the `fix_filename_extension()`. Commit message to be changed after with Julien's confirmation; opw-4753670 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#222556 Forward-Port-Of: odoo/odoo#222368
Combo product discounts now display correctly when a pricelist discount applies, both on the product page and during checkout. This prevents customers from seeing confusing crossed-out zero prices or missing discounts, improving pricing clarity in eCommerce flows.
Original PR description
Versions -------- - 18.0+ Steps ----- 1. Have a combo product; 2. create a pricelist that gives a 10% discount on the product; 3. go to product's website page; 4. observe the displayed discount; 5. add product to cart; 6. go to checkout. Issue ----- The discount has disappeared, instead it displays the original price next to a stricken-through "$ 0.00" Cause ----- The `_compute_discount` method does not get the correct `pricelist_item_id` for the combo items. Additionally, on checkout, it shows the `price_unit` of the combo line in the strike-through, which is always 0. Solution -------- When computing the discount of a combo item, retrieve the discount of its linked line, which has the correct value. Additionally, when displaying a combo product in eCommerce, use `_get_display_price_ignore_combo` instead of the `price_unit`. opw-4968848 Forward-Port-Of: odoo/odoo#223436 Forward-Port-Of: odoo/odoo#222472
Employee clock-in updates in Belgian POS now include the required staff identification field when shared with other devices. This prevents errors when another device receives the update and needs to communicate with the Belgian fiscal blackbox.
Original PR description
Before this commit, when clocking, the session was synchro with other devices but without the _employee_insz_or_bis_number custom field. _employee_insz_or_bis_number was thus not accessible after the device receives the websocket message and the pos was returning a traceback when trying to send a message to the blackbox. This commit fixes the issue.
Receipt validation now correctly triggers automatic lot or serial number label printing after a quality check is passed. This prevents missing label downloads when incoming products require quality checks, helping warehouse teams complete receiving flows without manual reprints.
Original PR description
## Issue: When 'auto_print_lot_labels' is activated on Receipts Operation Type, and you received a product, the print action wasn't trigger when you validate before making the Quality Check The…
## Issue: When 'auto_print_lot_labels' is activated on Receipts Operation Type, and you received a product, the print action wasn't trigger when you validate before making the Quality Check The wizard is automatically opened but when you click on the Pass button, the wizard was closed without sending the print action ## Cause: The action wasn't return by the wizard function 'action_generate_next_window()' making the only action to be a 'act_window_close' ## Note: The state wasn't correctly set to done for all products when you validate pickings both with and without QCs in them at the same time, it should now be fix Enabling Delivery Slip for the Receipts will make the SN to not be print even after disabling the option ## Steps to reproduce: - Toggle the Lot/SN Labels option in the Hardware Tab for the Operation Type Receipts - Create a Product tracked by Unique Serial Number - Add a Quality Check for the Receipts operation - Create a New Receipt for the product - Mark as Done and Add the Serial Number - Validate the receipt and Pass the check - Before the fix, no document was downloaded opw-4790427 Forward-Port-Of: odoo/enterprise#90134
Odoo Studio now ignores automatically added helper fields when displaying and arranging views. This prevents invisible technical fields from interfering with layout calculations, making Studio edits more reliable for users.
Original PR description
…lly added since commit odoo/odoo@6f06420e4a9443c52dc0cb427f8f55eb4aecabce, fields that are present in expression but not in the arch are automatically added. This caused problems in Studio, where those were considered normal nodes, while they should only be there to tell the model what to fetch. This commit aims at not rendering those nodes in a way that prevent them from parasiting the computation of xpaths. opw-4981741 Forward-Port-Of: odoo/enterprise#92751 Forward-Port-Of: odoo/enterprise#92602
Fixes an issue where closing a POS register could fail if an invoice selected for settlement was paid elsewhere at the same time. This helps cashiers close sessions reliably and avoids disruption from already-paid invoices.
Original PR description
This error occurs when attempting to settle an invoice in POS that has already been paid. Steps to reproduce: --- - Install `pos_settle_due` module - Create a new Invoice with Customer(eg: Billy Fox)…
This error occurs when attempting to settle an invoice in POS that has already been paid. Steps to reproduce: --- - Install `pos_settle_due` module - Create a new Invoice with Customer(eg: Billy Fox) and Confirm - Open `Bakery Shop` > Add Product > Select Customer(eg: Billy Fox) and `Settle Invoices` > Select the Invoice you created > Make payment - In another Tab, `Pay` the Invoice you created - Close Register Traceback: --- `TypeError: 'bool' object is not subscriptable` At [1], this error occurs because `inv.invoice_outstanding_credits_debits_widget` is set to `False`. This happens because, at [2], the condition `move.payment_state` evaluates to True, allowing the code to continue execution. As a result, `inv.invoice_outstanding_credits_debits_widget` remains False. [1]- https://github.com/odoo/enterprise/blob/95567f106fba3ed6d334ce6ad523378239865204/pos_settle_due/models/pos_session.py#L18-L21 [2]- https://github.com/odoo/odoo/blob/e61d55c6bf8afaef37d813a702438cb96baeddb1/addons/account/models/account_move.py#L1324-L1327 sentry-6628404004