Daily updates from Odoo
Friday, May 8, 2026
11 changes · 18.0
Resolved issues and error corrections
This update fixes an issue where tax calculations were incorrect when editing invoices with changed delivery dates and currency rates. The problem stemmed from a recomputation process triggered by currency changes, which was incorrectly applied to edited invoices due to a conflict with the l10n_hu_edi module. This ensures accurate tax calculations across invoices.
Original PR description
# How to reproduce - Install the l10n_hu_edi module - Switch to a Hungarian company - Enable a currency (e.g., EUR) and configure two different exchange rates on two different dates - Create a new…
# How to reproduce - Install the l10n_hu_edi module - Switch to a Hungarian company - Enable a currency (e.g., EUR) and configure two different exchange rates on two different dates - Create a new invoice with : - Delivery Date: One of the configured date - A line with a price unit and a tax - Save the invoice - Edit the invoice : - Delivery Date : The other configured date - Change the price unit of the line - Save the invoice # The problem The taxed amount total is using the old price unit # Cause ## TLDR This commit (https://github.com/odoo/odoo/pull/225407) made it so we recompute the tax when the currency is changed with round globally. This recomputation is based on the old tax values, so it should not be done when editing the base lines in the form view. To prevent this, a condition checks that the invoice date was not changed (which should be the only way to change the currency rate from that view if I understand correctly). Sadly, the l10n_hu_edi module changes this behavior and makes it so the currency rate is also recomputed when the delivery date changes ## Detailed analysis In the write() method of an account_move, we try to determine `round_from_tax_lines`. Before, in the situation where a base line is modified, it was computed here : https://github.com/odoo/odoo/blob/262088c98673a342aa0ccdd70465e3be6bcb2439/addons/account/models/account_move.py#L3032-L3049 In our use case, `round_from_tax_lines` would then equal to `False` But, this commit (https://github.com/odoo/odoo/pull/225407) added the following condition that made it so in our use case, `round_from_tax_line` is trucy : https://github.com/odoo/odoo/blob/262088c98673a342aa0ccdd70465e3be6bcb2439/addons/account/models/account_move.py#L3029-L3031 That value is then used right after in the computation of the tax line values : https://github.com/odoo/odoo/blob/262088c98673a342aa0ccdd70465e3be6bcb2439/addons/account/models/account_move.py#L3061 Since `round_from_tax_line` is trucy, we pass the tax_lines to the `_round_base_lines_tax_details()` function https://github.com/odoo/odoo/blob/262088c98673a342aa0ccdd70465e3be6bcb2439/addons/account/models/account_move.py#L1638 Which calls the `_round_tax_details_tax_amounts_from_tax_lines()` function. That function changes `base_lines["tax_details"]["tax_data"]` `tax_amount` and `tax_currency` based on the tax_lines `balance` and `amount_currency` https://github.com/odoo/odoo/blob/262088c98673a342aa0ccdd70465e3be6bcb2439/addons/account/models/account_tax.py#L2143-L2144 Except, those tax_lines values are the values of the current tax_lines, not the updated one. So they use the `balance` and `amount_currency` values of before the write https://github.com/odoo/odoo/blob/262088c98673a342aa0ccdd70465e3be6bcb2439/addons/account/models/account_move.py#L1631-L1632 `base_lines["tax_details"]["tax_data"]` is later used to define `tax_rep_data` https://github.com/odoo/odoo/blob/262088c98673a342aa0ccdd70465e3be6bcb2439/addons/account/models/account_tax.py#L2437-L2452 Which is then used to determine `base_lines_to_update` https://github.com/odoo/odoo/blob/262088c98673a342aa0ccdd70465e3be6bcb2439/addons/account/models/account_tax.py#L3074-L3080 Nevertheless, this issue is quite niche because the condition to assign `round_from_tax_lines` checks that the invoice date has not changed, which would be the only way to edit the currency rate and the base lines at the same time https://github.com/odoo/odoo/blob/262088c98673a342aa0ccdd70465e3be6bcb2439/addons/account/models/account_move.py#L3029 Except that the l10n_hu_edi module defines an override to recompute the currency rate when the delivery date changes https://github.com/odoo/odoo/blob/262088c98673a342aa0ccdd70465e3be6bcb2439/addons/l10n_hu_edi/models/account_move.py#L128-L130 # Proposed solution Since the tax recomputation is done using the values before the write, we never want to do it if the base lines have changed. Editing the condition of the commit that introduced the issue would not be enough because any module can ask for a currency rate recomputation for any reason. Because of this, we should do the tax recomputation only if the base_lines have not changed. opw-5800521 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
This update corrects a flaw in how Odoo retrieves online transactions. Previously, it only fetched transactions from the last sync date, potentially missing transactions before that date. Now, the system prioritizes the specified start date first, ensuring a more complete and accurate retrieval of online transaction data.
Original PR description
When you want to find missing transactions, you have to put a starting date. But we don't use this starting date to find the last statement line, we only use the last sync date, which is wrong, because if the last sync date is after the starting date, the online transaction identifier will have the wrong date. It means we will only fetch the transactions from last sync date to today. This commit makes sure we take the start date first if it exists, then the last sync date. task-6197277
This update automatically creates new bank accounts when importing data through the Italian EDI system. Previously, only contact and IBAN information was logged, requiring manual creation by the accountant. Now, the system will create the bank account, assign it to the correct customer, and mark it as untrusted.
Original PR description
The Italian EDI import didn't create new bank account by itself. IBAN info was just logged in the chatter, leaving it up for the accountant to create the bank account record. The bank account should be created and assigned to the corresponding commercial partner and set to not trusted yet. Enterprise PR: odoo/enterprise#112794 Task [link](https://www.odoo.com/odoo/project.task/6046189) task-6046189
This update corrects a technical issue preventing proper access controls within the appraisal system. The previous rule was incorrectly configured, leading to potential security vulnerabilities. This fix ensures that appraisal access is managed correctly, aligning with security best practices.
Original PR description
Before this commit, the rule `hr_appraisal_emp_rule_delete_new` was wrongly addressing the target permissions, not setting "False" where it should have though the default value is True. task-6201148
This update significantly speeds up the process of finding BOMs for product records. The change optimizes how the system searches for related BOMs, reducing search times by orders of magnitude. This improvement enhances overall system performance and responsiveness, particularly when dealing with large product catalogs.
Original PR description
Before this commit, finding a bom for a recordset of `products` involved looping over all the boms and it will loop over all the `product_variant_ids` of `bom.product_tmpl_id` if the bom's…
Before this commit, finding a bom for a recordset of `products` involved looping over all the boms and it will loop over all the `product_variant_ids` of `bom.product_tmpl_id` if the bom's `product_id` is NULL. This approach might loop over variants which we are not trying to find a bom for. In additon to that, due to the fact that multiple boms might have the same `product_tmpl_id`, this approach might consider the same variants in the inner loop redundantly even though we matched the variant with a bom in a previous itration.
Worst case, this might result in a time complexity of $O(N * M)$ where N is the number of boms and M is the number of variants.
To improve the performance, I only considered the variants given in the paramater `products` and in addition to that, I created a new dictionary mapping a `product_tmpl_id` to its bom if the bom doesn't have a variant set. By doing this, I can loop over the `products` given and if it doesn't have a bom set then it will be set to the one its template had taken from the previos loop.
In a method call with the following constraints
- **2** products the method was finding a bom for
- The 2 products had the same template and the template contained **550** active variants
- The boms were only related to the template rather than the variants themselves.
| Input Size | Before | After |
| :--- | :--- | :--- |
| 100 | 0.78s | 0.03s |
| 1000 | 8.53s | 0.11s |
| 10000 | 80.99s | 0.73s |
---
I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-prThis update fixes an issue where taxes were incorrectly assigned to the wrong company due to a change in how the system cached tax information. The fix ensures that taxes are now correctly linked to the specific company they belong to, improving data accuracy and financial reporting. This was identified and resolved as part of a broader effort to maintain data integrity.
Original PR description
Details and steps to reproduce are in Issue #262709 Cause: In #248680 the cache was changed to be global (per cr), meaning it is shared across companies. We need to partition the cache by company_id to prevent the assignment of taxes from the wrong company. OPW-6189579
This update fixes an issue where imported invoices were incorrectly using Swiss tax rates even when the invoice was for a Belgian customer. The change ensures that the correct tax rate is applied based on the invoice's fiscal location, resolving a data accuracy problem and preventing incorrect tax calculations. This improves the reliability of vendor bill imports.
Original PR description
**Steps to reproduce:** - Create a company in Belgium and set the fiscal localisation accordingly. - In the same company, create a fiscal position in Switzerland, set the foreign tax ID and then generate the taxes for it. - Install the module account_edi_ubl_cii. - Create and invoice for a belgian customer, with one product line having a 0% tax. - Export the invoice as XML. - Go to taxes, filter by purchase, and make sure that the 0% switzerland tax has a higher sequence than the belgian 0% tax. - Import the previous invoice XML as a vendor bill. **Issue:** After importing the bill, the switzerland tax is used even though the fiscal localisation is belgian, which is wrong as it violates the constraint _validate_taxes_country **Solution:** Added a more selective domain to _import_fill_invoice_line_taxes opw-5467936 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#255848
This update fixes an issue where the sale average price calculation was incorrect due to handling tax-inclusive and tax-exclusive prices on invoices. Now, the sale average price always uses the net amount (price_subtotal) after discounts, ensuring accurate reporting and pricing. This improves the reliability of sales data.
Original PR description
The price_unit of a account.move.line can be with or without tax. The sale_avg_price should be either incl. or excl. tax. To ensure the avg price is always excl. tax the price_subtotal can be used. Forward-Port-Of: odoo/odoo#225869 Forward-Port-Of: odoo/odoo#199209
This update corrects a bug where importing a product with a changed subscription type could bypass a necessary warning. Previously, the system processed the import without alerting the user, leading to potential inconsistencies. Now, a warning is raised when attempting to modify the subscription type of a product that has already been sold, ensuring data integrity.
Original PR description
__ ## Short functional explanation of the error When we have a subscription product that has already been sold. If we try to import a product with the same ID but where we change the subscription…
__ ## Short functional explanation of the error When we have a subscription product that has already been sold. If we try to import a product with the same ID but where we change the subscription type of the product, the import is executed without issue. However, this leads to undesired behavior: when we go to the product page and try to manually change the subscription type (set it back to subscription), the change is not applied as a warning is raised. ## Reproduction Steps Make sure you have debug mode enabled. 1. Create a product, and check the Subscription box. 2. Click on Orders and create a Quotation with this product, then confirm. 3. Go to Products > Products. Select the list view and search for the product you just created. Select it, and click Actions > Export. 4. Check the import compatible field. Select the fields to export: name, id and recurring_invoice. Upon exporting, a file is downloaded. 5. Access that file and change the recurring_invoice to FAUX or FALSE if your computer is in English. Save the changes. 6. Unselect the product and click on the cog, top right > Import. Click on Upload Data File and select the file that you have downloaded upon exporting, then import. ### Expected behavior A user warning is raised: we shouldn't be able to change the subscription type of the product when it has already been sold. ### Unexpected behavior The import is processed normally. Then, when we access the product page, and try to check the Subscriptions box again, a warning is raised. ## Origin of the issue Nothing prevents the import from occurring in that case. __ opw-6143789
This update resolves an issue preventing the POS scale integration with the new 19.2 IoT Box. The IoT box now sends scale data differently, triggering an error. This fix ensures the scale functionality continues to work correctly for all users.
Original PR description
Steps to reproduce - Use a localisation other than a european one (l10n_eu_iot_scale_cert must not be installed) - Setup the scale for the POS - Open the POS - Add a product to be weighted by scale to the order - Sell one of the weighted product Error: value.toFixed is not a function Cause: New versions of the IoT box send response status via data.status instead of data.status.status. [opw-6121011](https://www.odoo.com/odoo/project/49/tasks/6121011)
This update resolves an issue where branch users were unable to create transactions in parent company journals with foreign currencies. The fix ensures branch users can accurately handle currency conversions, improving usability and preventing access errors. This change impacts the account module.
Original PR description
**Problem:** When a branch user with no access to the parent company tries to create a transaction for a parent company's journal with a foreign currency set, this will raise an access error. **Steps…
**Problem:** When a branch user with no access to the parent company tries to create a transaction for a parent company's journal with a foreign currency set, this will raise an access error. **Steps to Reproduce:** - Make a branch of "My Company (San Francisco)" - Set user "Marc Demo" to only have access to the branch - Add a new bank journal set to "EUR" currency - Switch to Marc Demo - Try to add a transaction in the new bank journal **Root Cause:** When a transaction is created, Odoo determines the amount in company currency by converting it from the foreign currency. The method to convert currency uses "with_company()" to use the company's rates, but the allowed companies of the branch user does not have access to the parent company, causing an access error. **Solution:** If the company is the parent company of the active company, get the currency `inverse_rate` from the active company instead. Since branches use the rate of the parent, this will return the same result but without an access error. Ticket [link](https://www.odoo.com/odoo/project.task/6186901) opw-6186901 Forward-Port-Of: odoo/odoo#263425