Daily updates from Odoo
Thursday, June 4, 2026
120 changes
7 changes
Enhancements to existing features
This update adjusts how global discounts are handled in invoices to meet the requirements of UBL (Universal Business Language) standards. Previously, discounts were represented as negative invoice lines, which is now changed to 'Allowances'. This ensures our invoices are correctly formatted for international trade and compliance.
Original PR description
Export global discounts as Allowances instead of negative invoice lines to comply with UBL specifications. task-5900496 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#268177 Forward-Port-Of: odoo/odoo#261029
Resolved issues and error corrections
This update resolves an issue where unbalanced accounting moves within Point of Sale sessions were silently ignored. The system now automatically opens the balancing wizard when an imbalance is detected, ensuring users are alerted and can correct the transaction. This prevents potential financial discrepancies and improves the reliability of POS operations.
Original PR description
`_process_session_validation` rolls back the transaction and returns the `pos.close.session.wizard` action when it detects an unbalanced account move. However, `_validate_session` was discarding that return value, causing execution silently ignore the imbalance without prompting the user. opw-6238945 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
This update resolves an issue preventing the Cashmatic payment system from working correctly on self-order kiosks. The change ensures the necessary JavaScript files are loaded, enabling seamless payment processing in this key kiosk environment. This improves the overall customer experience.
Original PR description
This commit adds the cashmatic JS files to the correct asset bundle so that it loads correctly in the self order kiosk. --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
This update resolves an issue where multi-company orders were incorrectly assigning fiscal positions, leading to payment failures. The fix ensures the sale order's company is used when calculating the fiscal position, guaranteeing accurate accounting and order confirmation. This improves order processing reliability in our multi-company setup.
Original PR description
Issue: --- Due to this issue, in multi-company environment, wrong fiscal position might be assigned to the order, leading to `incompatible companies` error. Steps to reproduce: 1- On multi-company…
Issue: --- Due to this issue, in multi-company environment, wrong fiscal position might be assigned to the order, leading to `incompatible companies` error. Steps to reproduce: 1- On multi-company setup, assign a website to the second company. 2- Configure pickup method for second company. 3- Configure fiscal positions for both companies. 4- Setup auto invoice for second company. 5- Using public user, add a product to cart and checkout. 6- Use pickup method, and pay. The order is not confirmed. If you enable debug mode after payment, it will show an `incompatible companies` error. Cause: --- https://github.com/odoo/odoo/blob/43f5ceadbc1f7df9898c327bf65bffdbe9860c1c/addons/account/models/partner.py#L247-L279 `_get_fiscal_position` is using environment company to compute the fiscal position. However, `_compute_fiscal_position_id` causing the issue here is triggered inside `report_saleorder` template with user set as odoobot when trying to to send the confirmation. As a result, the odoobot company's fiscal position will be used causing this issue. Fix: --- We should ensure company from sale order is used by setting it as env company. opw-6186296 Forward-Port-Of: odoo/odoo#264123
This update fixes a calculation error in the Canadian Profit and Loss report. Previously, operating expenses were incorrectly added to gross profit, leading to inaccurate Net Operating Income figures. This change ensures the report accurately reflects the difference between gross profit and operating expenses, providing reliable financial reporting for Canadian users.
Original PR description
Steps to reproduce: 1. Install the Accounting app with the Canadian localization (l10n_ca) 2. Open the Profit and Loss report 3. Review the Net Operating Income line Issue: The Net Operating Income value is incorrectly calculated; operating expenses are being added to gross profit instead of subtracted, producing an incorrect result. Expected behavior: Net Operating Income should equal Gross Profit - Operating Expenses opw-6265192
This update resolves a critical issue that caused OOM crashes when generating the Swedish SIE 4 report with large datasets. By optimizing the database query and using efficient data processing techniques, the report now runs significantly faster and uses less memory, ensuring reliable export capabilities.
Original PR description
### Description of the issue/feature this PR addresses: Prevent Out of Memory (OOM) crashes and drastically improve execution speed when generating the Swedish SIE4 verification export for massive…
### Description of the issue/feature this PR addresses: Prevent Out of Memory (OOM) crashes and drastically improve execution speed when generating the Swedish SIE4 verification export for massive datasets. ### Current behavior before PR: When exporting a large volume of journal entries (e.g., 190,000+ account moves), the `_export_l10n_se_sie4_verification` method relies on iterating through heavy ORM recordsets and accessing relational child fields (move.line_ids) inside a loop. This triggers a severe N+1 query problem, maxing out server RAM and causing an OOM crash. ### Desired behavior after PR is merged: The method now utilizes a hybrid data extraction approach: - The ORM is used strictly to safely evaluate domains (multi-company rules, dates, states) and fetch a lightweight list of valid move_ids. - A single SQL query with JOIN statements fetches all parent moves, child lines, and account codes in exactly one database query. - itertools.groupby chunks the flat, lightweight dictionary results back into their respective journal entries. The export now handles massive datasets in seconds with minimal memory overhead, while remaining perfectly secure. ### Benchmark: For Memory: | # Input Data | Before PR | After PR | | -------- | -------- | -------- | | ~190,000 moves | MemoryError | 407MB| | ~200,000 moves | 1.8GB | 174.8 MB| For Speed: | # Input Data | Before PR | After PR | | -------- | -------- | -------- | | ~190,000 moves | MemoryError | 5.10s | | ~200,000 moves | 1m29s| 5.3s| ### Reference: opw-6067999 Forward-Port-Of: odoo/enterprise#118849 Forward-Port-Of: odoo/enterprise#113227
This update resolves an issue where the Odoo upgrade process would fail if it attempted to change the status of accounts with partially reconciled transactions. The fix ensures that the system doesn't modify account reconciliation flags during the upgrade, preventing errors and maintaining data integrity.
Original PR description
<h2>Context</h2> Clients can have some existing accounts with `reconcilable` flag set as True. Some of these accounts also have partially reconcilated transactions. In Odoo 19.0, it is not authorized…
<h2>Context</h2>
Clients can have some existing accounts with `reconcilable` flag set as True. Some of these accounts also have partially reconcilated transactions. In Odoo 19.0, it is not authorized to toggle the `reconcilable` flag from True to False on accounts that contain partially reconcilated transactions.
When the migration script `l10n_pl/migrations/2.1/end-migrate.py` is executed, it tries to update the CoA by adding/updating accounts, using the accounts in the file `l10n_pl/data/template/account.account-pl.csv`. This CSV file contains a reconcilable flag per account.
<h2>Problem</h2>
Before this modification, the upgrade script was trying to update the CoA using `_load_data`, which tries to overwrite the reconcilation flag of accounts in the client DB. A traceback occurs during the upgrade if an account's `reconcilable` flag is toggled from True to False during the update of the CoA, while it still contains partially reconciled transactions.
<details>
<summary>Traceback</summary>
```
File "/home/odoo/src/odoo/19.0/addons/l10n_pl/migrations/2.1/end-migrate.py", line 8, in migrate
Template._load_data({'account.account': Template._get_account_account('pl')})
File "/tmp/tmpm8z3nlb0/migrations/account/0.0.0/pre-ensure-deferred-accounts.py", line 36, in _load_data
return super()._load_data(data, *args, **kwargs)
File "/home/odoo/src/odoo/19.0/addons/account/models/chart_template.py", line 697, in _load_data
created_records[model] = self.with_context(lang='en_US').env[model]._load_records(all_records_vals)
File "/home/odoo/src/odoo/19.0/odoo/orm/models.py", line 5171, in _load_records
data['record']._load_records_write(data['values'])
File "/home/odoo/src/odoo/19.0/addons/account/models/account_account.py", line 1122, in _load_records_write
super()._load_records_write(values)
File "/home/odoo/src/odoo/19.0/odoo/orm/models.py", line 5092, in _load_records_write
self.write(values)
File "/home/odoo/src/odoo/19.0/addons/account/models/account_account.py", line 1045, in write
self.filtered(lambda r: r.reconcile)._toggle_reconcile_to_false()
File "/home/odoo/src/odoo/19.0/addons/account/models/account_account.py", line 975, in _toggle_reconcile_to_false
raise UserError(_('You cannot switch an account to prevent the reconciliation '
odoo.exceptions.UserError: You cannot switch an account to prevent the reconciliation if some partial reconciliations are still pending.
```
</details>
<h2>Solution</h2>
I have sanitized the dict `data` using the `_pre_reload_data` method, so that the traceback does not appear anymore when upgrading.
<h3>Notes</h3>
`_pre_reload_data` method sanitizes the dict `data` by avoiding the creation of duplicated accounts, the creation of duplicated fields for a given record, the toggling of the `reconcilable` flag, etcs.
---
I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
Forward-Port-Of: odoo/odoo#2570061 change
Resolved issues and error corrections
This update fixes an issue where project profitability reports were inaccurate when vendor bills included negative subtotals (like downpayments). The system now correctly accounts for these negative amounts, ensuring accurate cost calculations for projects with complex billing arrangements. This improves the reliability of project financial reporting.
Original PR description
**Problem:** If a vendor bill associated with a project through its analytic distribution has lines with negative subtotals, those lines are not considered in the project profitability report. An…
**Problem:** If a vendor bill associated with a project through its analytic distribution has lines with negative subtotals, those lines are not considered in the project profitability report. An example use case is a downpayment invoice, followed by a final invoice with the downpayment amount deducted. **Steps to Reproduce:** - Ensure project_purchase is not installed - Create a new project with "Billable" enabled - Go to the project settings and create an analytic account - Create and post a vendor bill with a line labeled "downpayment", the analytic account set, and a unit price of 5 - Duplicate the vendor bill, set the "downpayment" line unit price to -5, add a line labeled "product" with the analytic account set and a unit price of 10, and post the bill -> Go to the project updates and see that the vendor bill costs is wrong (15) **Solution:** A similar bug affecting customer invoices was resolved in PR #130992. AMLs with non-zero subtotals should be considered, so the domain is adjusted accordingly. opw-6172523 Forward-Port-Of: odoo/odoo#265378
3 changes
Resolved issues and error corrections
This update adjusts how Odoo's AI chat feature processes uploaded PDFs. Previously, it could only handle a limited number of pages (5). Now, the system dynamically determines the maximum number of pages to read, improving the processing of larger documents. This change ensures better AI interaction with uploaded PDFs.
Original PR description
Prior to this commit, when uploading a document (i.e. during a chat with an agent). Only a part of its pages would get parsed and sent to the API (5 pages). With this commit, the number of pages is made dynamic by the use of a new context key `ai_max_pdf_pages`. This variable is still set for the document autosorting features since it is not required to read the full document. Default value is None (no limit).
This update fixes an issue where project profitability reports were inaccurate when vendor bills included negative subtotals (like downpayments). The change ensures that all analytic lines, regardless of sign, are now correctly considered when calculating project costs and profitability. This improves the accuracy of financial reporting.
Original PR description
**Problem:** If a vendor bill associated with a project through its analytic distribution has lines with negative subtotals, those lines are not considered in the project profitability report. An…
**Problem:** If a vendor bill associated with a project through its analytic distribution has lines with negative subtotals, those lines are not considered in the project profitability report. An example use case is a downpayment invoice, followed by a final invoice with the downpayment amount deducted. **Steps to Reproduce:** - Ensure project_purchase is not installed - Create a new project with "Billable" enabled - Go to the project settings and create an analytic account - Create and post a vendor bill with a line labeled "downpayment", the analytic account set, and a unit price of 5 - Duplicate the vendor bill, set the "downpayment" line unit price to -5, add a line labeled "product" with the analytic account set and a unit price of 10, and post the bill -> Go to the project updates and see that the vendor bill costs is wrong (15) **Solution:** A similar bug affecting customer invoices was resolved in PR #130992. AMLs with non-zero subtotals should be considered, so the domain is adjusted accordingly. opw-6172523 Forward-Port-Of: odoo/odoo#265378
This update prevents issues during the Odoo upgrade process when updating client account settings. Specifically, it stops the script from incorrectly changing the 'reconcilable' flag on accounts with existing transactions, which previously caused upgrade errors. This ensures smoother and more reliable upgrades for our clients.
Original PR description
<h2>Context</h2> Clients can have some existing accounts with `reconcilable` flag set as True. Some of these accounts also have partially reconcilated transactions. In Odoo 19.0, it is not authorized…
<h2>Context</h2>
Clients can have some existing accounts with `reconcilable` flag set as True. Some of these accounts also have partially reconcilated transactions. In Odoo 19.0, it is not authorized to toggle the `reconcilable` flag from True to False on accounts that contain partially reconcilated transactions.
When the migration script `l10n_pl/migrations/2.1/end-migrate.py` is executed, it tries to update the CoA by adding/updating accounts, using the accounts in the file `l10n_pl/data/template/account.account-pl.csv`. This CSV file contains a reconcilable flag per account.
<h2>Problem</h2>
Before this modification, the upgrade script was trying to update the CoA using `_load_data`, which tries to overwrite the reconcilation flag of accounts in the client DB. A traceback occurs during the upgrade if an account's `reconcilable` flag is toggled from True to False during the update of the CoA, while it still contains partially reconciled transactions.
<details>
<summary>Traceback</summary>
```
File "/home/odoo/src/odoo/19.0/addons/l10n_pl/migrations/2.1/end-migrate.py", line 8, in migrate
Template._load_data({'account.account': Template._get_account_account('pl')})
File "/tmp/tmpm8z3nlb0/migrations/account/0.0.0/pre-ensure-deferred-accounts.py", line 36, in _load_data
return super()._load_data(data, *args, **kwargs)
File "/home/odoo/src/odoo/19.0/addons/account/models/chart_template.py", line 697, in _load_data
created_records[model] = self.with_context(lang='en_US').env[model]._load_records(all_records_vals)
File "/home/odoo/src/odoo/19.0/odoo/orm/models.py", line 5171, in _load_records
data['record']._load_records_write(data['values'])
File "/home/odoo/src/odoo/19.0/addons/account/models/account_account.py", line 1122, in _load_records_write
super()._load_records_write(values)
File "/home/odoo/src/odoo/19.0/odoo/orm/models.py", line 5092, in _load_records_write
self.write(values)
File "/home/odoo/src/odoo/19.0/addons/account/models/account_account.py", line 1045, in write
self.filtered(lambda r: r.reconcile)._toggle_reconcile_to_false()
File "/home/odoo/src/odoo/19.0/addons/account/models/account_account.py", line 975, in _toggle_reconcile_to_false
raise UserError(_('You cannot switch an account to prevent the reconciliation '
odoo.exceptions.UserError: You cannot switch an account to prevent the reconciliation if some partial reconciliations are still pending.
```
</details>
<h2>Solution</h2>
I have sanitized the dict `data` using the `_pre_reload_data` method, so that the traceback does not appear anymore when upgrading.
<h3>Notes</h3>
`_pre_reload_data` method sanitizes the dict `data` by avoiding the creation of duplicated accounts, the creation of duplicated fields for a given record, the toggling of the `reconcilable` flag, etcs.
---
I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
Forward-Port-Of: odoo/odoo#2570061 change
Resolved issues and error corrections
This update corrects a bug where previously validated manual bank statement entries continued to be incorrectly suggested for matching with new transactions. The fix ensures that only the most recent bank statement entry is considered during reconciliation, improving the accuracy of financial records. This resolves a potential issue with mismatched accounts.
Original PR description
Currently, after validating a transaction with a manual operation, the aml resulting from the manual operation can still be selected and matched with other transactions. Steps to reproduce: - Create a transaction for 500 dollars - Create a manual counterpart line for the bank statement line with label "test123" and validate - Create another transaction of -1000 dollars and label "test123" Issue: The manual counterpart line matched before is being suggested against the new transaction. The perfect match reconciliation model will reconcile the manual counterpart line with the new bank statement line. Adding test for community branch opw-6045050 Forward-Port-Of: odoo/enterprise#117462 Forward-Port-Of: odoo/enterprise#115847
5 changes
Resolved issues and error corrections
This update resolves an issue where Austria POS receipts weren't printing correctly due to an incorrect offset calculation. It also prevents authentication deadlocks with Fiskaly and FON, ensuring smoother integration. The previous response was unrelated and has been removed.
Original PR description
In this task: -------------- - Fixed Austria closing receipt printing by calculating the offset from the last closed month instead of the current month. Closing records are returned in ascending order and exist only for completed months, so the latest month must use offset 0. - Prevent a deadlock during Fiskaly and FON authentication by checking for open sessions before starting any authentication flow, instead of after the first step of authentication. - The resp was used to show error which was not in the scope. task: 5420256
This change reverts a recent update that was disrupting the process of reconciling bank transactions with previous statements. It allows users to continue their standard workflow of matching current transactions with historical records. This fix ensures accurate financial reporting and avoids disruptions to user operations.
Original PR description
This reverts commit e2a9f3bfbb8a89533146f76509bf2785c085ebea as it disrupt workflow where users needs to reconcile with a previous bank transaction Enterprise PR: https://github.com/odoo/enterprise/pull/118169 opw-6230807 Forward-Port-Of: odoo/odoo#268088 Forward-Port-Of: odoo/odoo#266057
This update reverts a previous change that was causing issues with matching manual bank reconciliation operations. It resolves a bug where past manual entries weren't correctly recognized, ensuring accurate record-keeping and reporting. This improves the reliability of financial data within the system.
Original PR description
This reverts commit 038f527793757c3148b775af1657c5a70a5abc66. opw-6230807 Forward-Port-Of: odoo/enterprise#119293 Forward-Port-Of: odoo/enterprise#118169
This update resolves an issue where DIAN POS orders would fail with refund errors due to missing customer information. The fix ensures the 'final consumer' partner is always loaded, preventing blank customer labels and allowing refunds to process smoothly. This improves the reliability of the POS refund process.
Original PR description
When DIAN POS is enabled, l10n_co_edi_pos auto-assigns the `Consumidor Final` partner to new POS orders. However, POS only preloads a limited partner set in frontend memory. If `Consumidor Final` is not part of that set, the order gets a partner id whose full partner data is not loaded in the UI. This causes the customer label to appear blank and refund flows to fail with "Can't change customer" mentioning `undefined`. To avoid this, always include the final consumer partner in `get_limited_partners_loading()`. This matches the approach already present in newer branches. opw-6238935 Forward-Port-Of: odoo/enterprise#119321 Forward-Port-Of: odoo/enterprise#118408
This update fixes an issue where project profitability reports were inaccurate when vendor bills included negative subtotals (like downpayments). The change ensures that all analytic lines, regardless of sign, are now correctly considered in calculating project costs and profitability. This improves the accuracy of financial reporting.
Original PR description
**Problem:** If a vendor bill associated with a project through its analytic distribution has lines with negative subtotals, those lines are not considered in the project profitability report. An…
**Problem:** If a vendor bill associated with a project through its analytic distribution has lines with negative subtotals, those lines are not considered in the project profitability report. An example use case is a downpayment invoice, followed by a final invoice with the downpayment amount deducted. **Steps to Reproduce:** - Ensure project_purchase is not installed - Create a new project with "Billable" enabled - Go to the project settings and create an analytic account - Create and post a vendor bill with a line labeled "downpayment", the analytic account set, and a unit price of 5 - Duplicate the vendor bill, set the "downpayment" line unit price to -5, add a line labeled "product" with the analytic account set and a unit price of 10, and post the bill -> Go to the project updates and see that the vendor bill costs is wrong (15) **Solution:** A similar bug affecting customer invoices was resolved in PR #130992. AMLs with non-zero subtotals should be considered, so the domain is adjusted accordingly. opw-6172523 Forward-Port-Of: odoo/odoo#265378
1 change
Resolved issues and error corrections
This update fixes an issue where project profitability reports were inaccurate when vendor bills included negative subtotals (like downpayments). The code now correctly considers these negative amounts, ensuring accurate cost calculations for projects with complex billing arrangements. This improves the reliability of project financial reporting.
Original PR description
**Problem:** If a vendor bill associated with a project through its analytic distribution has lines with negative subtotals, those lines are not considered in the project profitability report. An…
**Problem:** If a vendor bill associated with a project through its analytic distribution has lines with negative subtotals, those lines are not considered in the project profitability report. An example use case is a downpayment invoice, followed by a final invoice with the downpayment amount deducted. **Steps to Reproduce:** - Ensure project_purchase is not installed - Create a new project with "Billable" enabled - Go to the project settings and create an analytic account - Create and post a vendor bill with a line labeled "downpayment", the analytic account set, and a unit price of 5 - Duplicate the vendor bill, set the "downpayment" line unit price to -5, add a line labeled "product" with the analytic account set and a unit price of 10, and post the bill -> Go to the project updates and see that the vendor bill costs is wrong (15) **Solution:** A similar bug affecting customer invoices was resolved in PR #130992. AMLs with non-zero subtotals should be considered, so the domain is adjusted accordingly. opw-6172523 Forward-Port-Of: odoo/odoo#265378
2 changes
Resolved issues and error corrections
This update fixes an issue where project profitability reports were inaccurate when vendor bills included negative subtotals (like downpayments). The system now correctly considers these negative amounts, ensuring accurate cost calculations for projects with complex billing arrangements. This improves the reliability of project financial reporting.
Original PR description
**Problem:** If a vendor bill associated with a project through its analytic distribution has lines with negative subtotals, those lines are not considered in the project profitability report. An…
**Problem:** If a vendor bill associated with a project through its analytic distribution has lines with negative subtotals, those lines are not considered in the project profitability report. An example use case is a downpayment invoice, followed by a final invoice with the downpayment amount deducted. **Steps to Reproduce:** - Ensure project_purchase is not installed - Create a new project with "Billable" enabled - Go to the project settings and create an analytic account - Create and post a vendor bill with a line labeled "downpayment", the analytic account set, and a unit price of 5 - Duplicate the vendor bill, set the "downpayment" line unit price to -5, add a line labeled "product" with the analytic account set and a unit price of 10, and post the bill -> Go to the project updates and see that the vendor bill costs is wrong (15) **Solution:** A similar bug affecting customer invoices was resolved in PR #130992. AMLs with non-zero subtotals should be considered, so the domain is adjusted accordingly. opw-6172523
This update ensures that Odoo's yearly recurring events are properly synchronized with Microsoft Graph. Previously, a technical issue caused updates to these events to be silently dropped, resulting in incorrect scheduling. The fix includes adding the required 'month' field to recurrence patterns and extending support for the 'index' field, ensuring accurate yearly event updates.
Original PR description
Microsoft Graph requires the 'month' field (1-12) in recurrencePattern for absoluteYearly and relativeYearly event types. Omitting it causes a 400 ErrorInvalidRequest from Graph, silently dropping any Odoo-side update to a yearly recurring event. Also extend the 'index' field (relative weekday position) to yearly recurrences, which previously only set it for monthly ones.