Daily updates from Odoo
Friday, August 15, 2025
5 changes · saas-18.4
Resolved issues and error corrections
This fix makes an internal bus testing helper more reliable by preventing a timing issue that could cause automated tests to fail unexpectedly. It also corrects how test errors are reported, helping teams identify real problems more clearly and keeping release validation stable.
Original PR description
This change addresses two issues in the `waitForChannels` test utility: - Fixes a race condition. The `failTimeout` variable was sometimes accessed before its `setTimeout` declaration had been executed. This happens when a fast bus event triggers the `onWebsocketEvent` handler, resulting in a reference error. The variable is now declared at the beginning of the function, making it available before any access (fixes runbot-223252). - Corrects error in def.reject. `message` only takes one param, and a string does not have a join method. Forward-Port-Of: odoo/odoo#222967
This fix prevents Odoo Accounting from creating extra, unlinked exchange difference entries when an invoice and payment in the same foreign currency differ slightly due to rounding. It improves reconciliation accuracy and helps keep accounting records cleaner in affected multi-currency cases.
Original PR description
After https://github.com/odoo/odoo/pull/204746, in some situations we will default the amount of the partial on residual of debit aml even if this one is larger than the credit aml amount. This lead to multiple exchange moves creation that are not properly linked to the reconciliation chain. Steps to reproduce: 1/ Setup foreign currency with rate 0.648587 (ex 0.648587 USD = 1 AUD for AUD company) 2/ Create invoice with lines 36 USD (55.51 AUD) -7.2 USD (-11.1 AUD) => Receivable will be 28.8 USD (44.41 AUD) because it's computed from sum of above lines 3/ Register a payment of 28.8 USD (44.4 AUD) => Two exchange moves will be created with 0.01 in credit, none of them is in a partial with the invoice or payment line This PR makes sure that we take the smallest amount of residual if both credit and debit are considered as fully matched. opw-4835254 Forward-Port-Of: odoo/odoo#219237
French tax reports now compare calculated totals with proper rounding, avoiding false mismatches caused by hidden decimal precision. This helps prevent incorrect warnings or validation issues when displayed amounts are effectively the same.
Original PR description
Currently, the code was checking for a strict equality between two sums. However, it may happen that there are many decimals that aren't displayed on the UI, hence the strict equality check fails. For instance `30201.63 != 30201.629999999997`. Instead, we now use the `float_compare` which takes care of rounding issues. opw-5000147 Forward-Port-Of: odoo/enterprise#92405 Forward-Port-Of: odoo/enterprise#92356
Colombian DIAN invoice and credit note email templates will no longer disappear when the module is upgraded. This preserves users' sending workflows and avoids having to recreate or recover these templates after updates.
Original PR description
**Steps to reproduce:** - Install l10n_co_dian => "Invoice (DIAN): Sending" and "Credit Note (DIAN): Sending" email templates are created - Upgrade l10n_co_dian **Issue:** "Invoice (DIAN): Sending" and "Credit Note (DIAN): Sending" are deleted. **Cause:** Email templates are reset during a module upgrade. These DIAN email templates are not defined in a XML, but created by a python function. This function is only called during installation. **Solution:** Set the "nopupdate" to True for these email templates to prevent them to be reset during the module upgrade. opw-4964347 Forward-Port-Of: odoo/enterprise#91008
Subscription invoices for timesheet-based services now exclude entries dated on the next invoice date when no timesheet period is specified. This prevents hours from being attached to the wrong invoice and ensures they remain available for the following billing period.
Original PR description
Problem: When the user invoices a product based on timesheet from a subscription in a given month, the timesheets linked to the invoice incorrectly includes timesheets dated the same as the next…
Problem: When the user invoices a product based on timesheet from a subscription in a given month, the timesheets linked to the invoice incorrectly includes timesheets dated the same as the next invoice date of the subscription. This occurs if the client does not specify a timesheet period when creating the invoice. For example, the user invoices a subscription for the period of July 1st to July 31st and the next invoice date of the subscription is August 1st. There are timesheets dated in July and a timesheet dated August 1st. The quantity delivered for the invoice will only include timesheets within the July period. However, the linked timesheet to the invoice will mistakenly include the timesheet from August 1st. Purpose: Although the linked timesheet has no effect on the computation of qty_delivered for the current period, the timesheets dated the same as the next_invoice_date will get linked to the invoice and no longer be considered as delivered hours for the next period, which could cause gaps in hours delivered. The next_invoice_date should not be included in the date range when linking timesheets within the period of the invoice, since these hours were not included in the computation of quantity delivered. Steps to reproduce on Runbot: 1. Install Sales, Project, Timesheet 2. Enable Timesheet in Project > Settings 3. Create a service product that is based on timesheet and creates project and task on order 4. Create a quotation for the service product and set the recurrence to be monthly and set the start date to be the first of the past month 5. Confirm the quotation and set the next invoice date to be the first of the current month 6. Create timesheet hours within the period and one dated to be the first of the current month 7. Create an invoice for the subscription and notice that the timesheet from the first of the current month is linked to the invoice. opw-4689894 Forward-Port-Of: odoo/enterprise#92368 Forward-Port-Of: odoo/enterprise#92250