Daily updates from Odoo
Wednesday, May 27, 2026
19 changes · saas-19.2
Resolved issues and error corrections
This update resolves a bug in the HTML Editor where resizing the table would cause a crash when a table was deleted. The fix restricts resizing to the primary mouse button and prevents the resize logic from running when there's no valid target, ensuring a smoother and more stable user experience.
Original PR description
#### Description of the issue this PR addresses: - Table resize listeners are not cleaned when the table is removed while resizing - Next mousemove runs resize logic with a null target and throws traceback #### Desired behavior after PR is merged: - Restrict resize start to primary mouse button only - Prevent resize logic execution on null targets #### Steps to reproduce: - Open the todo app - Insert a table and select whole table - Move cursor on a table cell border to see resize cursor - Right click and choose Cut from browser context menu - Move the mouse again - Resize logic crashes with null target traceback task-6212279 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#266274 Forward-Port-Of: odoo/odoo#264065
This update resolves an error that occurred when users checked the details of eMPF contribution reports. The fix ensures that the system prompts users to correctly identify the employee before generating the report, preventing a technical error. This improves report accuracy and usability.
Original PR description
Currently, an error occurs when the user checks the report line errors. **Steps to Reproduce:** - Install the `l10n_hk_hr_payroll_empf` module with demo data. - Switch to the `Hong Kong` company. -…
Currently, an error occurs when the user checks the report line errors. **Steps to Reproduce:** - Install the `l10n_hk_hr_payroll_empf` module with demo data. - Switch to the `Hong Kong` company. - Go to `Payroll` > `Reporting` > `Hong Kong` > `eMPF Contributions`. - Create a record by setting the `Scheme` and adding a `contribution line`. - Ensure that the employee and payslip fields are empty in the contribution line. - Click on `Validate`, then click on the `error icon` on the report line. `ValueError: Expected singleton: hr.version()` This error occurs when the user manually adds a line and checks the errors on it.. The system attempts to open the employee record from the version [1], but the version is not set [2] on the line because there is no employee. And it raise the error [3]. This commit ensures that when checking errors, if the version is not set on the line, a UserError is raised, prompting the user to set the employee on the line. It also corrects a typo in the status message. [1]- https://github.com/odoo/enterprise/blob/7889b2b0b3d13b32e6e36e616e20379d8c8f8812/l10n_hk_hr_payroll_empf/model/l10n_hk_empf_contribution_report_line.py#L219 [2]- https://github.com/odoo/enterprise/blob/7889b2b0b3d13b32e6e36e616e20379d8c8f8812/l10n_hk_hr_payroll_empf/model/l10n_hk_empf_contribution_report_line.py#L142-L156 [3]: https://github.com/odoo/odoo/blob/98855c6b70df24500babe6027109aa9e17431ec1/addons/hr/models/hr_version.py#L609-L611 Forward-Port-Of: odoo/enterprise#116607
This update fixes an issue where extra prices on combo products weren't correctly converted to the sale order's currency, leading to inaccurate totals. The change ensures that extra prices are properly converted, resulting in accurate pricing calculations for combo products in different currencies. This improves the reliability of sales order pricing.
Original PR description
The total of a sale order containing a combo product that has an extra price is not correclty converted to the sale order's pricelist currency Steps to reproduce: 1. Install Sales 2. Go to Invoicing…
The total of a sale order containing a combo product that has an extra price is not correclty converted to the sale order's pricelist currency Steps to reproduce: 1. Install Sales 2. Go to Invoicing > Configuration > Accounting > Currencies and activate currency MXN 3. Go to Sales > Products > Pricelists and create a new pricelist for currency MXN 4. Go to Sales > Products and create a new combo product "test" 5. Create a combo choice "combo" with options "Large Cabinet" and extra price 10000$ 6. Go to Sales and create a new quotation for customer Acme Corporation with product "test" (total is $10,001) 7. Change the pricelist to MXN and update prices 8. The total is ~MX$10,018 (it should be ~MX$186,682) Issue: The extra price of a combo product is not converted to the sale order's pricelist currency, so we end up adding the price of the product in the order's currency with the extra price not converted Solution: Convert the extra price of the combo product to the sale order's pricelist currency opw-6192935 Forward-Port-Of: odoo/odoo#266172 Forward-Port-Of: odoo/odoo#265008
This update ensures Knowledge articles always load correctly when printed, regardless of the printing method. Previously, printing through various channels could cause blank pages. Now, CSS rules have been adjusted to prevent unintended styling issues in other Odoo modules, improving the overall printing experience.
Original PR description
Previously, the file containing the Knowledge print assets was lazy-loaded when the user triggered a print action through the UI. However, printing can also be initiated through other mechanisms…
Previously, the file containing the Knowledge print assets was lazy-loaded when the user triggered a print action through the UI. However, printing can also be initiated through other mechanisms (keyboard shortcuts, contextual menu, etc.), which prevented us from consistently detecting when to load the assets. In those cases, the assets were not loaded and the article appeared blank (see: odoo/enterprise#70243). To ensure the assets are always loaded regardless of how printing is triggered, we moved them to the common print bundle and adopted the standard asset-loading approach. This change also simplifies the codebase by removing JavaScript workarounds previously used to load the assets dynamically. However, some CSS rules in the Knowledge print stylesheet target global elements such as the web client container. Since the stylesheet is now included in a global asset bundle and always loaded, these rules apply to all modules and may cause rendering issues when printing views outside of Knowledge. To prevent such side effects, the CSS rules in `knowledge_print.scss` will be updated to use more specific selectors. The rules will be scoped so they only apply when the container includes the Knowledge view (using the `:has`). This PR also refactors the stylesheet by removing outdated rules that no longer match any elements. Several of these rules predate the major UI refactoring introduced in Odoo 16. Task-5999878 Forward-Port-Of: odoo/enterprise#109379
This update optimizes the process of exporting large datasets in Odoo, addressing potential memory issues that could cause slowdowns. By batching export calls and invalidating recordsets, the system now handles larger exports more efficiently, reducing memory usage and improving export speeds. This results in faster data exports for users.
Original PR description
When exporting a number N of records as XLSX or CSV file, we call the export_data() method for the N records at the same time. This method prefetches the selected fields for all the records which can lead to memory limit errors when N is too large. We propose to batch this call and invalidate the recordsets between batches. Benchmarks ----------- Execution time: | No records | Before PR | After PR | |------------|-----------|----------| | 70 260 | 3.82 s | 3.94 s | | 228 116 | 18.71 s | 19.36 s | | 394 381 | 31.02 s | 32.67 s | Memory usage: | No records | Before PR | After PR | |------------|-----------|----------| | 70 260 | 316.0 MB | 273.5 MB | | 228 116 | 796.9 MB | 620.8 MB | | 394 381 | 1.3 GB | 947.7 MB | opw-5881026 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#266078 Forward-Port-Of: odoo/odoo#257333
This update fixes a bug that prevented accurate IT tax closing validation, particularly when dealing with quarterly VAT reporting. The changes ensure correct handling of year-end gaps and utilize debit/credit columns in VAT reports, preventing errors and improving the reliability of tax closing processes.
Original PR description
Description of the issue this commit addresses: The IT tax closing validation compared month numbers only, which broke across year boundaries and could reject valid quarterly progressions. It also assumed a balance column existed in monthly VAT report lines, but this report uses debit/credit columns, which could trigger a traceback. --- Desired behavior after this commit is merged: This commit computes the period gap with year-aware month deltas and aligns the allowed gap with periodicity (monthly or quarterly). It also checks VP lines using balance when present, or debit/credit as fallback, preventing crashes and ensuring consistent tax closing validation. --- opw-6131080 Forward-Port-Of: odoo/enterprise#117428
This update fixes a bug where Preparation Displays (PDIS) weren't correctly updated during table actions like transferring or merging orders. Previously, new PDIS were created instead of reusing existing ones, leading to inconsistencies. Now, PDIS are synchronized across all table actions, ensuring accurate order information on both the POS and kitchen screens.
Original PR description
Task: [#5005179](https://www.odoo.com/odoo/1737/tasks/5005179) --- When executing table actions such as transfer, merge, link, or unlink, the related Preparation Displays (PDIS) were not being updated. This caused inconsistencies between the POS orders and the kitchen screens. Also, when merging or linking orders and cancelling some lines, a new `pdis_order` was created instead of reusing the existing one. This fix ensures that PDIS are correctly synchronized and notified on any table actions. Forward-Port-Of: odoo/enterprise#102623 Forward-Port-Of: odoo/enterprise#98374
This update fixes a problem where preparation displays (PDIS) weren't correctly updated when transferring, merging, or linking POS orders. Previously, new PDIS were created instead of reusing existing ones, leading to inconsistencies between the POS and kitchen screens. This ensures accurate order information is displayed on kitchen screens.
Original PR description
Task: [#5005179](https://www.odoo.com/odoo/1737/tasks/5005179) --- When executing table actions such as transfer, merge, link, or unlink, the related Preparation Displays (PDIS) were not being updated. This caused inconsistencies between the POS orders and the kitchen screens. Also, when merging or linking orders and cancelling some lines, a new `pdis_order` was created instead of reusing the existing one. This fix ensures that PDIS are correctly synchronized and notified on any table actions. Forward-Port-Of: odoo/odoo#240878 Forward-Port-Of: odoo/odoo#233630
This update corrects a bug where refund actions were incorrectly triggering the cancellation of original invoices. The fix adds a check to ensure the automatic cancellation process only applies to legitimate invoice replacements, preventing unintended credit note cancellations. This ensures accurate accounting and reporting for Mexican VAT (CFDI) transactions.
Original PR description
Issue: Implementation of automatic CFDI cancel flow of an invoice substituted by a new one accidentally resulted in sending credit notes created from an invoice also triggering cancellation of the original. Solution: adding a check to only apply to invoice replacements and not refunds. ticket-6245456 Forward-Port-Of: odoo/enterprise#118327
This update fixes an issue where invoices imported from UBL files were incorrectly calculating prices due to a missing discount application. The change ensures that discounts from AllowanceCharges are accurately added to the PriceAmount, resulting in correct invoice pricing. This resolves a problem that could lead to inaccurate financial reporting.
Original PR description
**PROBLEM** When importing a ubl bis3 file, with only the amount in the AllowanceCharge on PriceAmount it doesn't add the discount to PriceAmount to get the undiscounted price. Which means we create an invoice with the wrong price. This PR fixes that. opw-6102962 Forward-Port-Of: odoo/odoo#258964
This fix resolves an issue where confirming a sales order with multiple event registrations would cause a system error. The update now correctly creates multiple leads when multiple event registrations are associated with a single order, ensuring accurate lead tracking for events with multiple attendees. This improves the reliability of the event registration process.
Original PR description
# How to reproduce - Install the Events, Porject & CRM apps - Create two event A & B with tickets that can be purchased - Go to Events > Configuration > Lead Generation - Create a Lead Generation…
# How to reproduce - Install the Events, Porject & CRM apps - Create two event A & B with tickets that can be purchased - Go to Events > Configuration > Lead Generation - Create a Lead Generation Rule with : - Create : Per Order - When : Attendees are created - Event : None - Create a new quotation with two lines : - Product : Even Registration for event A 1st, then B - Confirm the SO # The problem A traceback will appear # Cause of the issue When confirming the SO, we create `event.registrations`s that will check for lead generation rules and create or update `crm.lead`s accordingly : https://github.com/odoo/odoo/blob/3bf89b4f467390807c20f7b007a875a77542e76f/addons/event_crm/models/event_registration.py#L35 We will then group the registrations by leads & grouping model : https://github.com/odoo/odoo/blob/3bf89b4f467390807c20f7b007a875a77542e76f/addons/event_crm/models/event_lead_rule.py#L166 For all groups, if the lead does not exist, we create one : https://github.com/odoo/odoo/blob/3bf89b4f467390807c20f7b007a875a77542e76f/addons/event_crm/models/event_lead_rule.py#L184-L187 `_get_lead_values()` works fine with multiple `event.registrations`s, but crashes when those registrations does not have all the same event, which is our case : https://github.com/odoo/odoo/blob/3bf89b4f467390807c20f7b007a875a77542e76f/addons/event_crm/models/event_registration.py#L170 # Proposed solution Since we have multiple events and leads are associated to a single event : https://github.com/odoo/odoo/blob/3bf89b4f467390807c20f7b007a875a77542e76f/addons/event_crm/models/crm_lead.py#L11 We group the registrations by event and create multiple leads accordingly opw-6167518 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#265017
This update resolves a memory issue that could cause invoice imports to fail with large product catalogs. The fix uses a more efficient batch processing method to reduce unnecessary calculations and memory consumption, preventing performance bottlenecks.
Original PR description
Before this commit, for DBs with a very large number of products it was possible for the thread to run out of memory when importing an invoice or a bill. The reason is that the name on…
Before this commit, for DBs with a very large number of products it was possible for the thread to run out of memory when importing an invoice or a bill. The reason is that the name on product.product is non stored and computed. This leads to tons of recomputes, which in turn leads to reads and stores in cache of the underlying `product.product`, which down the line uses up all of the available memory for the thread. The proposed method uses batches instead of a `search_fetch` as the latter would not solve the recompute problem and hence the underlying memory problem. Another alternative approach could be going straight for the `product.template.name`, but that approach might introduce a loss of precision or functionality when searching for products at invoice import. Here is the memory graph from memray before the fix: <img width="1106" height="450" alt="opw-6168737-memray-pre-fix" src="https://github.com/user-attachments/assets/f971dc4d-aa09-41e3-a8c5-e5ca53f9786d" /> And here is the same graph after the fix: <img width="1106" height="450" alt="opw-6168737-memray-post-fix" src="https://github.com/user-attachments/assets/0a784cdc-9b40-498b-bbcb-89114eec1ec9" /> We can see a much lower peak memory usage after the fix. We an also observe that the memory complexity shifts from `O(n)` to `O(1)`, with `n` being the number of `product.product` records stored in the DB. For both presented graphs, the same, unaltered database was tested. The database contains 389 467 `product.product` records. opw-6168737 Forward-Port-Of: odoo/odoo#265639 Forward-Port-Of: odoo/odoo#262591
This update corrects a bug where payments received from providers were sometimes partially reconciled, leading to inaccurate accounting records. Now, all payments from providers are fully reconciled, ensuring accurate financial reporting. This change improves the reliability of our accounting system.
Original PR description
When we receive a payment from a provider, we allow partial reconciliations to be done on this move, but we shouldn't. Payments coming from providers are always either fully paid, or not paid at all. task-5893189 Forward-Port-Of: odoo/odoo#254597
This update fixes an issue where COGS calculations were inaccurate due to incorrect unit of measure conversions and a bug related to customer returns. Specifically, the system now correctly handles different unit of measure conversions for COGS lines and prevents incorrect monetary values from being applied to intermediate stock moves during return processing, ensuring accurate financial reporting.
Original PR description
[FIX] sale_stock: convert quantity using correct UoM The quantity unit conversion was applied to an already summed value, ignoring the fact that individual COGS lines may have different UoMs. --- [FIX] stock_account: Do not copy field 'value' of StockMove When a customer return is split into multiple steps (e.g., Customer -> Input -> Stock), the `value` field of the stock move was being copied from the first step to the second. This caused the second step (which should not be valued) to inherit the monetary value, leading to incorrect COGS entries when the invoice was posted. The value should only be set when the move is Done, not during a copy. --- OPW-6076350 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#260495 Forward-Port-Of: odoo/odoo#257543
This update prevents a user without sign admin rights from encountering an access error when viewing records with sign request activities. The change uses 'sudo' to ensure visibility and disables actions to avoid errors, while also creating activities directly linked to the request creator. This improves the sign request workflow for all users.
Original PR description
**Steps to reproduce** - Have user A with Sign admin rights and user B without Sign rights. - With user A, create a sign request activity on a record that user B can access. Send the signature…
**Steps to reproduce** - Have user A with Sign admin rights and user B without Sign rights. - With user A, create a sign request activity on a record that user B can access. Send the signature request. - With user B, try to access the record. -> AccessError when trying to fetch the chatter. **Cause** By default, users get access to all the activities associated to records they have access to (see `_search` of `mail.activity`). This is an issue since some of the fields added in `_store_activity_fields` for the sign request activity display might not be accessible for a user with access to the activity. **Change** Use `sudo` to be able to display the activity, even if the user doesn't have access to the sign request. Also, in that case, `can_write` should be `False` in order to hide the action buttons of the activity, which trigger access errors when trying to make operations on the sign request. Another related change is to create the activity for the user creating the sign request, this avoids falling back on the `user_id` of the record associated with the activity and makes sure the activity's user has access to the sign request. opw-6157455
This update corrects a rounding issue that previously caused the withholding base amount on invoices to exceed the total invoice amount. The fix ensures accurate calculations by limiting the withholding base amount to prevent over-reporting. This improves invoice data integrity and compliance.
Original PR description
**PROBLEM** In some case, because of rounding issues, the withholding base amount can be bigger than the total amount of the invoice, which should not be the case. **STEP TO REPRODUCE** 1. Install…
**PROBLEM** In some case, because of rounding issues, the withholding base amount can be bigger than the total amount of the invoice, which should not be the case. **STEP TO REPRODUCE** 1. Install l10n_pe_edi 2. Create an invoice with those 2 lines: qty: 300, unit_price: 0.481936, tax: VAT 18% + 3% IGV Withholding qty: 300, unit_price: 0.747376, tax: VAT 18% + 3% IGV Withholding 3. Confirm the invoice, and send the xml (if this fail, you may have to change the name of the invoice, using odoo inspector or other means). 4. Open the xml, and notice the base amount for the allowance on the document level is 435.18 which is bigger than the invoice payable amount. **CAUSE** We exclude the withholding taxes to compute the invoice taxInclusiveAmount. When computing this amount, we round the line base and the tax total of the VAT 18% tax leading to the result of 435.17. When creating the allowance node for the Withholding taxes, the base used for the withholding taxes is the sum of the line base, and the tax total of previous tax NOT rounded. There is no easy way to change the withholding tax computation, so we just limit the base to not be bigger than the invoice total when there is rounding issues. opw-6010388 Forward-Port-Of: odoo/enterprise#113689
This update fixes an issue where payments weren't automatically linked to invoices when invoices were created after payment processing. Previously, this caused reconciliation problems with automated payment records. Now, payments are correctly linked to the invoice, ensuring accurate financial reporting.
Original PR description
Steps to reproduce: - Ensure Automatic Invoice setting is on - Create sales order for product with ordered quantites invoicing policy - Generate a Payment Link - Pay with the ACH Direct Debit method via a provider (e.g. Stripe) - While the payment is processing, confirm the sales order, create an invoice, confirm the invoice Current Behavior: When the payment is finished processing, the payment is not automatically linked to the corresponding invoice Expected Behavior: When the payment is finished processing, the payment should be linked to the invoice despite it being created by a user Explanation: The payment transaction's link to invoice_id is severed in PaymentTransaction._invoice_sale_orders if an invoice is created before the payment is cleared. This will eventually lead to the account.payment created automatically later on not being reconciled with the invoice. opw-6087656 Forward-Port-Of: odoo/odoo#264800
This update resolves an issue where production orders created from sale orders (using multi-step routes) didn't always correctly update delivery quantities. The fix ensures that the `move_dest_ids` are properly propagated across all production orders created from a single sale order, particularly when using batch sizes. This guarantees accurate inventory tracking and order fulfillment.
Original PR description
### Steps to reproduce: - In the settings enable: Multi-steps routes - Inventory > Configuration > Warehouse Management > Routes - Unarchive MTO - Create a storable product P with a bom using the MTO…
### Steps to reproduce: - In the settings enable: Multi-steps routes - Inventory > Configuration > Warehouse Management > Routes - Unarchive MTO - Create a storable product P with a bom using the MTO Route - In the Miscellaneous tab of the bom tick Batch Size and set it to 2 - Create and confirm a sale order for 6 units of P #### > Three MO's are created but only the last one will update the quantities of the delivery at validation of the production. ### Cause of the issue: The `move_dest_ids` of the `move_finished_ids` is only set on the last of the three productions. That is only the last MO is properly chained to the delivery via an MTO chain. This happens because the `move_dest_ids` field of the `mrp.production` model is a `One2Many` field: https://github.com/odoo/odoo/blob/a2f072fe99a03aaf521bba1965e7f29a1c99e325/addons/mrp/models/mrp_production.py#L223-L224 Which implies that each move can be linked to at most one mrp.production via the `created_production_id` field. However, if you have set a batch size on your bom, it is expected for a single move to create multiple mo's. While the `move_dest_ids` of each of these MO is appropriately set in the create vals to be the mto `stock.move` of the delivery, due to the nature of the `created_production_id` field only the *last* mo will created with a set `move_dest_ids` as this is the only record that will be set as `created_production_id`. However, after the creation of these MO's, the related `move_finished_ids` will be recomputed: https://github.com/odoo/odoo/blob/a2f072fe99a03aaf521bba1965e7f29a1c99e325/addons/mrp/models/mrp_production.py#L1089-L1093 However, the `move_dest_ids` of the created moves will be set to be either the `move_dest_ids` of their production (which is unset for all but the last one) or these of the first production of the same `production_group` that is these generated by a common production split: https://github.com/odoo/odoo/blob/a2f072fe99a03aaf521bba1965e7f29a1c99e325/addons/mrp/models/mrp_production.py#L1263-L1267 Now, since neither are set in our use case, the `move_dest_ids` will not be set on the `move_finished_ids` which implies in particular that the mto link between our productions (but the last one) and the delivery is lost. Fix: Since we can not change the nature of the `move_dest_ids` and `created_production_id` in stable to become Many2Many fields, we need to find a way to propagate the `move_dest_ids` on moves without relying on the probably inaccurate value provided by the production. And, since the compute of the `move_finished_ids` could be launched at many other points than during a create process (because of the many dependencies), we can not solely rely on the creation context but rather new to provide a way to recreate the link from relations at any given point. We therefore rely on the `stock.reference`'s similar to what was done prior to 19.0 via the `procurement_group_ids`: https://github.com/odoo/odoo/blob/132f042ca14012877f608783b57a0ca9c4e565f3/addons/mrp/models/mrp_production.py#L1198-L1202 opw-6188069 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#264951
This update fixes a bug where adding serial numbers to outgoing stock picks (when the quantity is zero) would incorrectly add additional serial numbers, leading to quantity mismatches. The change ensures that only the manually added serial numbers are applied, maintaining accurate stock counts. This improves the reliability of our inventory tracking.
Original PR description
**Problem**: When we set the quantity of a move to zero, then add serial numbers manually, if the serial numbers are not the first ones in the list of available serial numbers, The first few…
**Problem**: When we set the quantity of a move to zero, then add serial numbers manually, if the serial numbers are not the first ones in the list of available serial numbers, The first few available serial numbers will be added to the move, which causes a mismatch of quantity and the number of serial numbers. **Before this commit:** If we have three serial number SN-001, SN-002, SN-003 created in order, and we set the quantity of the move to zero, then add SN-002 and SN-003 manually, SN-001 will be added automatically while saving. **After this commit:** Only SN-002 and SN-003 will be added to the move, which matches the quantity. **Steps to reproduce:** 1. Create a product with tracking by unique serial number, and create 3 lots SN-001, SN-002, SN-003 for this product. 2. Create a picking and add a move for this product, set the demand to 3 and quantity to 0. 3. Set the quantity to 2, and add SN-002 and SN-003 to the move, then save the picking. 4. SN-001 will be added to the move automatically, but the quantity stays at 2. opw-6121208 Forward-Port-Of: odoo/odoo#266259 Forward-Port-Of: odoo/odoo#263080