Daily updates from Odoo
Thursday, June 4, 2026
262 changes
17 changes
Enhancements to existing features
This update enhances how we track usage of our AI models by adding detailed labels to each request. This allows us to better understand which sources – like agents or web searches – are driving token consumption, leading to more accurate cost analysis and optimization of our AI investments. The changes improve our ability to monitor and manage AI resource utilization.
Original PR description
Tag each completion request with a human-readable label identifying what issued it (the agent, web search, AI field, AI server action, ...) so token usage can be attributed to a given source-model combination. Agent-driven requests are prefixed with "Agent:" to set them apart from feature calls. Example: ``` AI: [Agent: Ask AI] gemini-2.5-flash-lite request [0.68s] - Tokens: 115 in (0 cached)|5 out|0 reasoning AI: [Agent: Ask AI] gemini-3-flash-preview request [2.64s] - Tokens: 5295 in (4050 cached)|79 out|186 reasoning AI: [web search] gemini-3-flash-preview request [21.24s] - Tokens: 562 in (226 cached)|708 out|1343 reasoning AI: [Agent: Odoo Image Generation Agent] gemini-2.5-flash-image request [8.25s] - Tokens: 423 in (0 cached)|1324 out|0 reasoning ```
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
A recent test within the HR Holidays module was failing due to an error in how it checked for related records. This commit corrected the test by using a different method to identify records, preventing installation issues when other modules are installed alongside HR Holidays. This ensures smoother module installations and prevents potential disruptions.
Original PR description
Before this commit, the line https://github.com/odoo/odoo/blob/saas-19.1/addons/hr_holidays/tests/test_holidays_mail.py#L69 used `.id` on a many to many recordset which failed when the recordset had multiple records. This test led to an error when installing other modules with demo data like `test_l10n_be_hr_payroll_account` and the test was run with demo data. This commit uses the `in` operator instead of `==` and avoids `employee_ids.id` to avoid the error. Runbot error: https://runbot.odoo.com/odoo/error/241106 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#266677
This update fixes a visual issue where Polish and Vietnamese characters displayed inconsistently on Android Edge browsers. The fix ensures proper font rendering by providing additional font subsets to browsers that don't fully support Unicode ranges, maintaining consistent character appearance across different devices and browsers.
Original PR description
Scenario: - paste "język việt" (polish + vietnamese) in a page - change website font to not be "Noto Sans", for example: Raleway - open the page on Edge Browser on Android Result: polish and…
Scenario: - paste "język việt" (polish + vietnamese) in a page - change website font to not be "Noto Sans", for example: Raleway - open the page on Edge Browser on Android Result: polish and vietnamese characters are using different font and are visually different than latin character. Cause: google fonts is serving for nearly all browsers font configuration with woff2 files and unicode-range so the user only loads the part of the font that will be used on the website. For Edge browser on android, based on the user-agent chrome is serving only a TTF file without unicode-range because it is thinking that unicode-range is not supported. These files only contain basic latin characters, so extended latin and vietnamese characters are being rendered with fallback "Odoo Unicode Support Noto" that has a different weight and style for the same weight. Fix: For the browser not supporting unicode-range (desktop edge before 2020, Edge on android, …), in addition to latin we ask google fonts to provide([1]) latin-extended and vietnamese subsets in TTF/WOFF files if available. For other subset (hebrew, arabic, cyrillic, …) the intent is to fallback on "Odoo Unicode Support Noto" since they should usually not be mixed with latin characters. Note: Edge on android in reality support unicode range, so this would be solved if google fonts just served the unicode range font configuration for that user-agent. [1]: https://developers.google.com/fonts/docs/getting_started#specifying_script_subsets opw-4642242 Forward-Port-Of: odoo/odoo#267798
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 preventing the unsubscribe dialog on the website from functioning correctly. The change was initially intended to update for a new software version, but a key step was missed, causing a technical error. This fix ensures the unsubscribe dialog is properly displayed and operational.
Original PR description
This commit 974e0066f8c56aad831de97a581e56b95ba53dc6, introduced a bug by adding 'this' to templates in preparation for owl 3. But it omitted this inherited template making the xpath invalid. Task-6276225 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
This update optimizes the website's performance by replacing a complex selector with a simpler one. This change reduces the time it takes for the website to recalculate styles, particularly when viewing large tables or resizing the browser window, leading to a faster and more responsive user experience.
Original PR description
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 Forward-Port-Of: odoo/odoo#268106 Forward-Port-Of: odoo/odoo#267969
This update resolves an issue where stock move descriptions were incorrectly displaying HTML content due to a fallback mechanism. The change removes this fallback, using the product's display name instead, and standardizes the handling of descriptions across different picking creation methods. This ensures consistent and accurate stock move descriptions.
Original PR description
Currently, if there's no receipt/delivery/internal description, a move description will use a product internal note as a fallback. The issue is that this is an html field and it doesn't show its…
Currently, if there's no receipt/delivery/internal description, a move description will use a product internal note as a fallback. The issue is that this is an html field and it doesn't show its content correctly. This PR aims to remove this fallback. If no description is found, then it proposes to use the display_name of the product, which is later ignored in `stock_move_product_label.js` anyway. Second, if a picking is created manually, the description_picking is in the vals, which triggers `_inverse_description_picking`. This is different if the picking is created by a SO, PO, MO, etc. We're unifying the behavior by making sure to remove `description_picking` from the create vals. However once a move is done, the description should be immutable. So we're also adding a call to `moves_todo._inverse_description_picking` to for a write on `description_picking_manual` when marking a move as done. task 6131699 --- 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 introduces a new keyboard shortcut (ALT + SHIFT + R) to quickly open the timesheet systray. This simplifies the process for employees to record their time, improving efficiency and usability. This change was implemented as a bug fix.
Original PR description
This commit adds an `ALT + SHIFT + R` shortcut to open the timesheet systray. task-6197777 Forward-Port-Of: odoo/enterprise#116753
This update resolves an issue where negative line items in the Mexican CFDI tax calculation were incorrectly distributed. The change addresses a recent update that introduced new line item types, making the previous method for detecting negative lines obsolete. This ensures accurate CFDI reporting for Mexican businesses.
Original PR description
In MX CFDI, negative lines are not allowed so they are distributed over other lines. But because this PR introduces some other `special_type` like `global_discount` and `down_payment`, it becomes useless to check `base_line['special_type'] == False`. Fix for https://github.com/odoo/odoo/pull/267435 task-5900496 --- I confirm I have signed the CLA and read the PR guidelines at [www.odoo.com/submit-pr](http://www.odoo.com/submit-pr) Forward-Port-Of: odoo/enterprise#119327 Forward-Port-Of: odoo/enterprise#119254
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 a technical issue that could cause errors when managing floor screens in the restaurant POS system. The change prevents users from creating duplicate configurations, which avoids a system error and ensures stable POS operation. This improves the reliability of the restaurant ordering process.
Original PR description
Duplicating a floor screen causes a duplicated key exception when rendering the POS. To avoid this issue, duplication on the backend is not allowed. task-6246748 Forward-Port-Of: odoo/odoo#266734
This update ensures that the subject displayed in the chatter reflects any changes made to the message subject within the composer. Previously, updates in the composer weren't immediately visible in the chatter, leading to potential confusion. This improvement provides a more accurate and up-to-date view of message subjects for all users.
Original PR description
If the user updates the subject in the composer, the suggested subject in the chatter should reflect the latest message. task-5944635 Forward-Port-Of: odoo/odoo#267140
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#2570068 changes
Resolved issues and error corrections
This update fixes a visual issue where Polish and Vietnamese characters displayed inconsistently on Android Edge browsers. The fix ensures proper font rendering by providing additional font subsets to browsers that don't support Unicode ranges, maintaining consistent character appearance across different devices and browsers.
Original PR description
Scenario: - paste "język việt" (polish + vietnamese) in a page - change website font to not be "Noto Sans", for example: Raleway - open the page on Edge Browser on Android Result: polish and…
Scenario: - paste "język việt" (polish + vietnamese) in a page - change website font to not be "Noto Sans", for example: Raleway - open the page on Edge Browser on Android Result: polish and vietnamese characters are using different font and are visually different than latin character. Cause: google fonts is serving for nearly all browsers font configuration with woff2 files and unicode-range so the user only loads the part of the font that will be used on the website. For Edge browser on android, based on the user-agent chrome is serving only a TTF file without unicode-range because it is thinking that unicode-range is not supported. These files only contain basic latin characters, so extended latin and vietnamese characters are being rendered with fallback "Odoo Unicode Support Noto" that has a different weight and style for the same weight. Fix: For the browser not supporting unicode-range (desktop edge before 2020, Edge on android, …), in addition to latin we ask google fonts to provide([1]) latin-extended and vietnamese subsets in TTF/WOFF files if available. For other subset (hebrew, arabic, cyrillic, …) the intent is to fallback on "Odoo Unicode Support Noto" since they should usually not be mixed with latin characters. Note: Edge on android in reality support unicode range, so this would be solved if google fonts just served the unicode range font configuration for that user-agent. [1]: https://developers.google.com/fonts/docs/getting_started#specifying_script_subsets opw-4642242 Forward-Port-Of: odoo/odoo#267798
This update fixes an issue where payments for Mexican invoices were being sent to CFDI multiple times, leading to inaccurate reporting. The change ensures the 'Update Payments' button only appears after the invoice payment is fully reconciled, preventing duplicate submissions and maintaining accurate financial records. This improves compliance with Mexican tax regulations.
Original PR description
Issue: Sending payments to SAT before its full amount is reconciled allow sending the same invoice payment several times to CFDI. Steps to reproduce: - In a Mexican company - Create an invoice A of…
Issue: Sending payments to SAT before its full amount is reconciled allow sending the same invoice payment several times to CFDI. Steps to reproduce: - In a Mexican company - Create an invoice A of $40 to Inmobiliaria CVA - Confirm and send to CFDI - Go to bank, create a new Bank transaction of $80 - reconcile with Invoice A - Go to invoice A => click on button "Update payments" (it doesn't appear in previous versions) - Then sheet CFDI and Download There is the first XML sent to CFDI with payment for invoice A - Create an invoice B of $40 to Inmobilira CVA - Confirm and send to CFDI - reconcile the transaction with Invoice B - Go to invoice B - Click on button "Update payments" - Then sheet CFDI and Download There is the second XML sent to CFDI with payment for invoices A and B Invoice A payment was sent twice to CFDI Expected behavior: - The "Update payment" button should appear only once the invoice payment is fully reconciled. Current behavior: - The update payment button appear once the invoice is reconciled with a payment. The method `_l10n_mx_edi_cfdi_invoice_get_payments_diff` is called twice, once to check whether it's needed to display the "Update button" and once when you try to update the payment (called only after clicking on said button). opw-5432421 Forward-Port-Of: odoo/enterprise#118850 Forward-Port-Of: odoo/enterprise#108355
This update fixes a translation issue in Odoo's Argentine localization module (l10n_ar) that caused confusion regarding fiscal position names. The translations now accurately reflect the purpose of each position, eliminating duplicates and ensuring domestic positions are correctly labeled.
Original PR description
### Description of the issue/feature this PR addresses: Fix fiscal position spanish translation to match with its real purpose. ### Current behavior before PR: * We have a fiscal position name that does not match with its purpose: Represent the local operations inside argentina (country: Argentina) but the name is " Purchases / Sales abroad" * Two fiscal positions have the same translation value and this is confusing ### Desired behavior after PR is merged: * we do not have duplicated fiscal position anymore * Domestic fiscal position is taged with the correct name --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: https://github.com/odoo/odoo/pull/248462
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
The visual appearance of the portal chatter message delete dialog has been corrected. This change addressed a styling issue caused by a recent update and ensures the dialog displays correctly for all users. It includes necessary styles for message content formatting, improving the user experience.
Original PR description
The delete message dialog in the portal chatter has been visually broken since #247708, which replaced the generic `MessageConfirmDialog` (size="xl") with a dedicated `MessageDeleteDialog` (size="md"). The md size triggers the `o_modal_design_minimal` design path in `dialog.js`, whose styles are defined in `dialog.scss`. Additionally, message content may contain html_editor-formatted elements (blockquote in thi scase) whose styles come from `html_editor.assets_editor`. Neither was included in `portal.assets_chatter_style`. This change adds those missing styles to the portal chatter shadow DOM. **Before:** <img width="637" height="290" alt="image" src="https://github.com/user-attachments/assets/2dae0e72-383d-4277-94e7-ef23a01ea53b" /> **After:** <img width="637" height="317" alt="image" src="https://github.com/user-attachments/assets/ca36bc51-3cc9-43c6-bcf2-30c03498353c" />
This update fixes a translation error in the Argentine fiscal position settings, ensuring the names accurately reflect their purpose. Previously, a confusing duplication of fiscal positions existed, now all domestic positions are correctly labeled, streamlining accounting processes for Argentina.
Original PR description
### Description of the issue/feature this PR addresses: Fix fiscal position spanish translation to match with its real purpose. ### Current behavior before PR: * We have a fiscal position name that does not match with its purpose: Represent the local operations inside argentina (country: Argentina) but the name is " Purchases / Sales abroad" * Two fiscal positions have the same translation value and this is confusing ### Desired behavior after PR is merged: * we do not have duplicated fiscal position anymore * Domestic fiscal position is taged with the correct name --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#248462
This update resolves a technical issue within the Odoo POS Restaurant module that could cause errors during screen rendering. The change prevents users from duplicating floor screens on the backend, eliminating a potential system crash and ensuring stable POS operations. This improves the reliability of the restaurant ordering system.
Original PR description
Duplicating a floor screen causes a duplicated key exception when rendering the POS. To avoid this issue, duplication on the backend is not allowed. task-6246748 Forward-Port-Of: odoo/odoo#266734
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 the account's reconciliation flag remains unchanged 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#2570068 changes
Resolved issues and error corrections
This update corrects a technical issue preventing invoices with long product names, descriptions, or notes from being correctly processed for Romanian E-Factura submissions. The system now enforces character limits (100, 200, and 300 characters respectively) to ensure compliance with Romanian regulations. This resolves rejection errors and allows for proper E-Factura generation.
Original PR description
**Steps to reproduce:** - Install Accounting and l10n_ro_edi - Switch to a Romanian localization (e.g. RO Company) - Configure Romanian E-Factura - Create an invoice with a product having a name…
**Steps to reproduce:** - Install Accounting and l10n_ro_edi - Switch to a Romanian localization (e.g. RO Company) - Configure Romanian E-Factura - Create an invoice with a product having a name longer than 100 chars - Confirm the invoice - Send E-Factura to SPV - Fetch E-Factura status **Issue:** The invoice is rejected with the following error: "[BR-RO-L100]-The allowed maximum number of characters for the Item name (BT-153) is 100." **Similar issue with the product description:** "[BR-RO-L200]-The allowed maximum number of characters for the Item description (BT-154) is 200." **Similar issue with the note (i.e. Terms and Conditions):** "[BR-RO-L300]-The allowed maximum number of characters for the Invoice note (BT-22) is 300." **Solution:** Truncate the name of the product to 100 chars in the electronic invoice, the description of the product to 200 and the note to 300. opw-5964904 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#267850 Forward-Port-Of: odoo/odoo#265811
This update fixes an issue where discounts entered with a comma (used in some regions) were incorrectly interpreted as zero. The change ensures that discounts with commas are now correctly applied to orders, preventing revenue loss and improving order accuracy. This resolves a technical bug impacting discount calculations.
Original PR description
Before this commit, if comma was used as decimal separator, the fixed discount valu was added to the order as zero discount. opw-6268557 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
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 a visual issue where Polish and Vietnamese characters appeared differently on Android Edge browsers due to font rendering differences. The fix ensures consistent character display across browsers by providing additional font subsets for older Edge versions that don't support Unicode ranges. This improves the user experience for international content.
Original PR description
Scenario: - paste "język việt" (polish + vietnamese) in a page - change website font to not be "Noto Sans", for example: Raleway - open the page on Edge Browser on Android Result: polish and…
Scenario: - paste "język việt" (polish + vietnamese) in a page - change website font to not be "Noto Sans", for example: Raleway - open the page on Edge Browser on Android Result: polish and vietnamese characters are using different font and are visually different than latin character. Cause: google fonts is serving for nearly all browsers font configuration with woff2 files and unicode-range so the user only loads the part of the font that will be used on the website. For Edge browser on android, based on the user-agent chrome is serving only a TTF file without unicode-range because it is thinking that unicode-range is not supported. These files only contain basic latin characters, so extended latin and vietnamese characters are being rendered with fallback "Odoo Unicode Support Noto" that has a different weight and style for the same weight. Fix: For the browser not supporting unicode-range (desktop edge before 2020, Edge on android, …), in addition to latin we ask google fonts to provide([1]) latin-extended and vietnamese subsets in TTF/WOFF files if available. For other subset (hebrew, arabic, cyrillic, …) the intent is to fallback on "Odoo Unicode Support Noto" since they should usually not be mixed with latin characters. Note: Edge on android in reality support unicode range, so this would be solved if google fonts just served the unicode range font configuration for that user-agent. [1]: https://developers.google.com/fonts/docs/getting_started#specifying_script_subsets opw-4642242 Forward-Port-Of: odoo/odoo#267798
This update resolves an issue where the Timesheet Assistant wouldn't function correctly when rules were created without a specified template. The fix ensures that all rules require a template, allowing the assistant to accurately build display names for key events. This improves the reliability of the timesheet tracking process.
Original PR description
## [FIX] timesheet_grid: make template field required in AW rule Before this commit, the template field in AW rule was not required and if one rule without any template is set, timesheet assistant will not be able to work correctly to build the display name for the key events found. This commit makes sure the template field is required. ## [FIX] timesheet_grid: ignore rules without template defined Before this commit, when the user creates a rule without any template set, the timesheet assistant will no longer work because it assumes the template is required. This commit adds a condition in the domain when we fetch all AW rules, to ignore the ones without template set.
This update resolves an issue where credit notes couldn't be created if the system encountered an archived bank account. The fix ensures that the system explicitly checks for inactive bank accounts during credit note creation, preventing validation errors and allowing invoices to be confirmed. This improves the reliability of credit note processing.
Original PR description
When creating a credit note, it is possible for the compute method _compute_partner_bank_id to be called in a context where active_test is falsy, leading to moves that cannot be validated because it…
When creating a credit note, it is possible for the compute method _compute_partner_bank_id to be called in a context where active_test is falsy, leading to moves that cannot be validated because it would raise with the following error message: > The recipient bank account linked to this invoice is archived. So you cannot confirm the invoice. The state of the 'active_test' ctx key cannot be known in advance in a compute and should not be assumed as True; according to the framework team: > In practice, a compute method cannot expect active_test to have > a particular value. It may be invoked with any context. There is no > "context purge" done by the ORM. The computation may be "prepared" > with a context (the one of modified()) and actually done with another > context (code accessing the field before some explicit flush). In > other words, if the compute method searches for a record that matches > some conditions, and if that record cannot be inactive, then this > condition must be explicit in the search domain (or in the context). opw-6229286 Forward-Port-Of: odoo/odoo#267398
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
6 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 a problem where users accessing archived documents through certain methods (like widgets or direct URLs) would incorrectly display a 'not found' message. This fix ensures that archived documents are correctly accessed and displayed, improving the user experience. It's a follow-up to previous related tasks.
Original PR description
When a user tries to access an archived document via * a many2one widget * `/odoo/documents.document/<id>` * a discuss notification they end up in "All" with a toast specifying that the document was not found. Follow-up of Task-6068437 (follow up of Task-5386466). Task-6214488 Forward-Port-Of: odoo/enterprise#119188 Forward-Port-Of: odoo/enterprise#117229
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
Enhancements to existing features
This update enhances the employee avatar card by displaying key payroll information – wage, pay frequency, and employment category – directly within the popup. This provides users with a quick overview of an employee's payroll details. The changes are restricted to users with specific payroll access permissions.
Original PR description
Show wage (with currency and pay frequency), employment category, and seniority in the footer of the employee avatar card popup. The section is only sent to and rendered for users with `hr_payroll.group_hr_payroll_user` access. task-6117982
3 changes
Resolved issues and error corrections
This update resolves an issue where refunded orders were still visible in the 'Orders to Settle' list when the customer account was balanced. The fix ensures that orders and their associated refunds are removed from this list when the customer account reaches zero, streamlining the settlement process for users. This improves clarity and reduces manual intervention.
Original PR description
Currently, if you refund an order made on the customer account with the customer account as well, you can still see the order in the list of orders to settle. Steps to reproduce: -------------------…
Currently, if you refund an order made on the customer account with the customer account as well, you can still see the order in the list of orders to settle. Steps to reproduce: ------------------- * Open shop * Make an order using the customer account for a customer, don't invoice it * Refund one of the order using the customer account, don't invoice it * Make a new order using the customer account * In the customer list, find the customer used and select "Settle Orders" > The 2 orders are present in the list Why the fix: ------------ Originally the list would only show the orders for chich the customers have due (>0). https://github.com/odoo/enterprise/commit/bf4b6043b999b4a081b1afa73fc4113bf4db28f8 But recently the code we also see the refunds in the list as well. https://github.com/odoo/enterprise/commit/12af23d5382e972facfaa999e4c5ab30c97e8d1f However this new behavior is not visible if, with the refund, the customer account temporarily falls to 0. So currently we have some refunds that impact the amount to settle and some that don't. Originally we were thinking that either we should show all refunds in that list (given they use the customer account) or we shouldn't show any as it was previously. Both solutions are not ideal. * Showing them all would get the list bigger than it is and would require the customer to select the order and its refund(s) and settle them together. Since refunds are not usually done right after the order they would not be close it that list. However this solution would enable the option to remove the orders from the list requiring a few step from the customer. * Showing none isn't idea either with this use case as it means that we still see orders that were cancelled out by their refunds. To remove to order the customer has two options. Either going backend and searching the order and its refund(s) and invoice them, either settling the order but that means that now there's money deposited on the customer account. Any of the two option isn't perfect a it still requires manual intervention from the customer and wouldn't work on previous data. Creating a server action to correct those data wouldn't have been feasible either. Instead, the approach we're taking is the following: When loading the list of order to settle we want to remove the orders and the potential refunds were the customer account is evened out. We only need to look at the orders of the partners that contains refunds for which the customer account was used. If the sum of the transactions made on the customer account is 0 we can say that the order and its refunds have cancelled out each other (in terms of customer account) and we don't show them if the list of orders remaining to settle. opw-6170830
This update corrects a display problem on the POS Kanban view for businesses not using the 'blackbox' configuration. The update now correctly retrieves session information from the POS session model, ensuring accurate version badges and session details are shown. This improves the user experience and data accuracy for standard POS setups.
Original PR description
- Hide the FDM version badge on the POS kanban view for non blackbox config - Read `bookingPeriodId` and `bookingDate` from the frontend `pos.session` model instead of the computed `current_session_id` backend field on `pos.config`.
This update fixes an issue where the tag container overlapped with the header in the sign module due to longer translated strings. The changes automatically adjust the container's position and reduce its height to ensure a clean layout across different languages and content lengths. This improves the user experience and visual consistency.
Original PR description
Description: - The `.o_sign_template_tags_and_save` container relied on a hardcoded vertical offset (`top: 65px`) while being absolutely positioned. This assumed a fixed control panel height and…
Description: - The `.o_sign_template_tags_and_save` container relied on a hardcoded vertical offset (`top: 65px`) while being absolutely positioned. This assumed a fixed control panel height and caused the tags container to overlap with the header content when the neutralized red header bar expanded to multiple lines due to longer translated strings. - Replaced `top: 65px` with `top: auto` to remove the dependency on a fixed vertical offset and allow the element to be positioned according to its computed static position. - Reduced the height of `.o_field_widget.o_field_many2many_tags` from `50px` to `35px` to better fit the available space within the header area and prevent visual overlap between tag rows and surrounding elements. - This change preserves the existing positioning strategy while making the layout resilient to variable header heights caused by translations and other content-dependent UI variations. 19 - https://github.com/odoo/enterprise/blob/3db8db2eac3dff1485c6a1c977c80e573bfe6cab/sign/static/src/scss/sign_backend.scss#L486 Before fix: <img width="1874" height="443" alt="image" src="https://github.com/user-attachments/assets/196feab3-3460-4ed9-9f57-d7744e9c4e4b" /> After fix: <img width="1319" height="412" alt="image" src="https://github.com/user-attachments/assets/93ae5bcd-f0f0-4999-9cf7-f83b82d689ac" />
13 changes
New functionality added to Odoo
This update expands Odoo's SII (Societat Impostaria Informàtica) functionality to include support for the Hacienda Foral de Navarra tax agency. It addresses a specific requirement for Navarra businesses to use a different endpoint and XML namespace declarations when submitting invoices, ensuring compliance with local regulations. This addition allows companies to accurately report SII data to the Navarra tax authority.
Original PR description
The Hacienda Foral de Navarra uses the same SII XML format as AEAT but sends invoices to a different endpoint. Additionally, Navarra requires explicit XML namespace declarations in the SOAP envelope header, which the standard zeep serializer does not include by default. This adds the Navarra tax agency as a new option in the company SII configuration, defines its production and test endpoints, and injects the required namespaces in the request header when the Navarra agency is selected. task-5946583 I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
Resolved issues and error corrections
This update resolves a potential error in the PDP reporting flows that could occur when new or incomplete flow records are created. The fix ensures the system handles missing due dates gracefully, preventing crashes during form creation. This improves the stability and reliability of the reporting process.
Original PR description
PDP reporting flows compute their period status from the due period dates. On a new or incomplete flow record, those dates can still be empty during form/onchange initialization. The compute then tried to compare today's date with `False`, which could crash generic form creation. This patch makes the compute handle missing period dates before doing date comparisons. runbot.build.error-939459
This update fixes an issue where vendor bills imported from Poland's KSeF system were not correctly accounting for discounts applied per unit. The change adds support for the 'P_10' XML node, as specified in official KSeF documentation, ensuring accurate bill import and compliance. This improves the reliability of financial data.
Original PR description
When fetching vendor bills from KSeF, the XML node "P_10" is used to indicate a discount per unit on a line. This node is currently being ignored when parsing the file. Official documentation: https://ksef.podatki.gov.pl/media/gn2kt4gl/broszura-informacyjna-struktury-logicznej-e-faktury-fa-1-wersja-anglojezyczna.pdf opw-6235460 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
This update fixes an issue where the 'Cancel Reason' wasn't being properly transmitted when reversing invoices in Peruvian companies. The change ensures that credit notes generated after a reversal accurately reflect the user-specified cancellation details required by the Peruvian tax authority (SUNAT). This improves data accuracy and compliance for Peruvian businesses using Odoo.
Original PR description
### Issue before this commit: When reversing an invoice in a Peruvian company, the "Cancel Reason" entered in the credit note window is not propagated to the Peruvian EDI tab of the resulting Credit…
### Issue before this commit: When reversing an invoice in a Peruvian company, the "Cancel Reason" entered in the credit note window is not propagated to the Peruvian EDI tab of the resulting Credit Note. Only the Credit Reason is successfully reported. ### Steps to reproduce the issue: 1. Download Accounting and l10n_pe 2. Switch to PE company 3. Create an invoice and confirm it 4. Create a credit note for the invoice with a cancel reason and a credit reason and click the reverse button 5. See that in the Peruvian EDI tab only the Credit Reason is reported but not the Cancel Reason ### Cause of the issue: In the l10n_pe_edi module, the override of the _prepare_default_reversal method maps the l10n_pe_edi_refund_reason to the new move's values, but completely omits the mapping of the wizard's textual reason field to the l10n_pe_edi_cancel_reason field of the resulting credit note. ### Reason to introduce the fix: To ensure the generated credit notes contain all required information for the Peruvian EDI (SUNAT). Mapping the cancel reason guarantees that the electronic document accurately reflects both the refund code and the descriptive cancellation text provided by the user. opw-6238525
This update resolves a checkout bug where applying discounts on products with different taxes caused an infinite reload cycle. The fix ensures discount lines are correctly grouped by reward ID, synchronizing the backend and frontend for accurate checkout processes. This improves the user experience and prevents disruptions during discount application.
Original PR description
**Step to reproduce :** 1. Create a deliverable product with a sales tax. 2. Create another product with a different sales tax. 3. Publish both products on the eCommerce website. 4. Create a discount…
**Step to reproduce :**
1. Create a deliverable product with a sales tax.
2. Create another product with a different sales tax.
3. Publish both products on the eCommerce website.
4. Create a discount program.
5. Add both products to the shopping cart.
6. Apply the discount code.
7. Proceed to checkout.
**Issue :**
Applying a discount on multiple products with different taxes causes an infinite reload cycle during checkout.
**Reason :**
The reload is supposed to sync the discount lines in the back-end with the discount lines displayed during checkout. If the number of lines don't match, a reload is triggered.
https://github.com/odoo/odoo/blob/18.0/addons/website_sale_loyalty/static/src/js/checkout.js#L22-L24
After the fix introduced in:
https://github.com/odoo/odoo/pull/248215
However, when a discount is applied to products with different taxes, the corresponding reward lines are still categorized as `discounted_lines` instead of `groupable_lines`. As a result, they continue to be processed individually rather than being grouped by reward.
This leads to a mismatch between the backend, which generates one discount line per tax combination, and the frontend, which expects a single discount entry per reward. Consequently, the checkout page continuously reloads while attempting to synchronize both states.
**Solution:**
When a discount applies to products with different tax configurations, the corresponding reward lines should be included in `groupable_lines` rather than `discounted_lines`. This ensures that discount lines are grouped by
`reward_id` consistently on both the frontend and backend, preventing the checkout reload loop.
opw-6210411This update resolves an issue where users were prevented from uploading documents to requests linked to records they didn't have full access to. By adding a '.sudo()' function during the attachment creation process, users can now upload documents regardless of their specific access rights, improving workflow efficiency.
Original PR description
Issue: Users are currently blocked from uploading requested documents if the request is linked to a record they do not have access to (e.g., User A links Record X to a request assigned to User B, but User B lacks read/write access to Record X). The system throws an error because the user cannot create an attachment for that record. Fix: Add .sudo() on the attachment creation process. task-6107099
This update corrects a bug in how leads are assigned to sales teams, ensuring a more equitable distribution, especially when team members have similar quotas. Previously, older team members received a disproportionate number of leads due to a bias in the assignment process. This change improves fairness and prevents imbalances in lead distribution.
Original PR description
_assign_and_convert_leads() is biased towards team members created earlier because they're ordered by create_date, id. When members have equal quota, the round-robin order falls back to the order of the team members. If the amount of leads distributed across the team is not a multiple of the team size, then the oldest members will get more leads assigned. This advantage repeats each time the cron runs and can add up to a big difference, the provided test case ends up assigning all 30 leads to the more senior member without the fix. Note that the lead_day_count field used in _get_assignment_quota() doesn't solve the problem. It helps to balance leads assigned in the same 24 hour window, but because the same senior person always goes first inside one of those windows, they will always get more leads assigned to them. To fix it we break ties in the quota randomly. task-6119168
This update fixes an issue where closing a POS session could incorrectly attempt to cancel transactions belonging to other POS terminals. The change now ensures transactions are fetched and canceled only for the current POS terminal, enhancing the reliability and accuracy of session closure. This prevents errors and improves the overall POS experience.
Original PR description
Before this commit, when closing a POS session, it fetched all active transactions via generic /tx endpoint, which returns transactions across all TSS. Attempting to cancel a transaction belonging to another TSS raised:
"Not a Transaction of TSS <tss_id>"
Fix by scoping the fetch to /tss/<tss_id>/tx so only transactions of the current TSS are returned, and appending client_id as an additional filter to avoid touching transactions from other POS terminals sharing the same TSS. A JS-side client_id check is kept as a defensive safety net before the cancellation loop.
opw-6243187This update fixes a bug that prevented proper error messages from appearing when new IoT Boxes encountered problems. The change ensures that users receive clear notifications about errors, improving the overall reliability and troubleshooting of the IoT Box functionality within Odoo Enterprise. This resolves a previously missed error handling issue.
Original PR description
This completes odoo/enterprise#11196, which missed error message handling for new IoT Boxes errors. `message_body` was undefined on `data.status` when `data.status === "error"`. <img width="1871" height="942" alt="image" src="https://github.com/user-attachments/assets/30b54c5b-da0d-497d-8d9e-912f7139140b" />
This update corrects a bug in the VAT reporting module that was incorrectly displaying '01' as the operation code for invoices with 'No Sujeto por reglas de localización' (PT VAT) taxes. The fix ensures accurate reporting by aligning with the Spanish VAT regime code table, improving the reliability of VAT book exports.
Original PR description
**Steps to reproduce:** * Install the **l10n_es_edi_sii** module. * Create a **Portuguese customer**. * Go to **Settings** and enable **EU Intra-community Distance Selling**, then refresh the tax…
**Steps to reproduce:** * Install the **l10n_es_edi_sii** module. * Create a **Portuguese customer**. * Go to **Settings** and enable **EU Intra-community Distance Selling**, then refresh the tax mapping. * Create a customer invoice with a **"No Sujeto por reglas de localización"** tax (e.g. **23.0% PT VAT**). * Go to **Accounting → Reporting → Tax Report → OSS Sales**. * Export the **VAT Record Books (XLSX)** file and open it. **Observed behavior:** * The "Clave de Operación" column shows "01" for lines with no_sujeto_loc taxes instead of "17". * The SII JSON for the same invoice correctly shows "ClaveRegimenEspecialOTrascendencia": "17". **Cause:** * In `_l10n_es_libros_get_common_line_vals()`, `operation_code` was computed manually as `'02' if exempt_reason else '01'`, which only handled the E2 exempt case and defaulted everything else to "01". * This missed OSS/no_sujeto_loc taxes (e.g. FR VAT, PT VAT) that should produce "17" per the Spanish VAT regime code table. **Fix:** * Extract operation code computation into a new dedicated method `_l10n_es_libros_get_operation_code()`. * For customer invoices, delegate to the existing `_l10n_es_get_regime_code()` method already used by SII, which correctly returns "17" for OSS-tagged taxes, "02" for E2 exempt, and "01" otherwise. * For vendor bills, mirror the SII logic by checking whether the invoice taxes include tags from `mod_303_casilla_10_balance` or `mod_303_casilla_11_balance` (intra-community indicators), returning "09" if so and "01" otherwise. opw-6197141,6216485
This update fixes a calculation error in the executive summary report that was underreporting the number of days in a period. Previously, the report was calculating the gap between dates instead of the total number of days. This change ensures the average debtor days and other key metrics are accurately calculated, improving the reliability of the report.
Original PR description
`_report_custom_engine_executive_summary_ndays` returned `date_to - date_from`, which is the gap between the two dates, not the count of days they span. For example April 2026-04-01 to 2026-04-30 will returned 29 instead of 30, making Average Debtor Days incorrect. Add +1 so the day count is inclusive of both endpoints, matching the rest of the report's date handling. opw-6215362 Forward-Port-Of: odoo/enterprise#118953
This update corrects a previous issue where website orders automatically generated CFDI invoices, which was unnecessary and potentially problematic. Now, invoices are only created for website orders when the customer provides all required information, aligning with standard e-commerce practices. This ensures a smoother and more accurate order process.
Original PR description
There is no reason why we would always cfdi to public when creating orders from the e-commerce. When the customer give all their info, the invoice should not be cfdi to public. opw-6180766 Forward-Port-Of: odoo/enterprise#116061
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
5 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 resolves an issue where excessively long addresses in payment fields caused errors during Authorize.net transactions. The system now automatically truncates address information to comply with the Authorize.net API's length restrictions, ensuring smooth and reliable payment processing. This change improves data integrity and prevents payment failures.
Original PR description
Steps to reproduce: - install payment_authorize module; - complete a credit card payment using Authorize.net with more than 60 characters on any other field than first name, last name or company; - confirm the payment. Issue: An error message appears. Cause: The Authorize.net API define the max length of information. It is possible that some information exceeds the maximum length. (https://apitest.authorize.net/xml/v1/schema/AnetApiSchema.xsd) Solution: Truncate information if the number of character is too large. opw-6141441 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#262154
This update resolves an issue where invoices with zero amounts and untrusted partner bank accounts would fail to process. The fix ensures the correct bank account is selected based on the order amount (negative for refunds, positive for regular invoices), improving the reliability of zero-amount transactions. This prevents errors and ensures proper invoicing functionality.
Original PR description
**Steps to reproduce:** - In the contact app, chose your company - Go to the Accounting tab - Create a bank account and check "Send Money" - Create a partner, create a bank account for it - Do not…
**Steps to reproduce:** - In the contact app, chose your company - Go to the Accounting tab - Create a bank account and check "Send Money" - Create a partner, create a bank account for it - Do not Check the "Send Money" - Go to the POS, click on a product and refund it 100% to make the price 0 - Chose the partner we created as the client and ask for an invoice - Try to pay, the account is not trusted **Why the fix:** With this same steps, if we make a normal order with a price different than zero, it will work. But if the price is negative, we will get the same error. This happens because the *partner_bank_id* is chosen depending on if this is a refund or not. With an amount of zero, the order is considered to be a refund, and we chose the partner's partner_bank_id, which is not trusted. On a normal positive flow, we chose the company's which is trusted, so we can send the money and it works. This does not make sense to assume a zero amounted order is a refund, because when we invoice something that is zero or greater, we get an invoice, but only for the *partner_bank_id* we chose it as if it was a credit note. So we should take the partner's *partner_bank_id* for every order that has a strictly negative amount, and take the company's for every order that is zero or positive. Another way to fix this would be to backport this commit that also resolves this issue starting in 18.0 by adding a fallback to the company's *partner_bank_id*, but it might be a bit much of a change for version 17.0 https://github.com/odoo/odoo/commit/7e63991dceb6e443b950e6a1b94454a82d5668c7 opw-6005384
This update resolves an issue where the 'Fill' option on the /shop page's product image editor wasn't functioning as expected. The fix ensures that product thumbnails now correctly adjust their fill mode (cover or contain) based on the toggle selection, improving the visual presentation of products.
Original PR description
**Problem:** On the /shop page, the "Fill" option in the web editor (cover/contain toggle on product card images) appears clickable but has no visible effect on the product thumbnails. **Steps to…
**Problem:**
On the /shop page, the "Fill" option in the web editor (cover/contain toggle on product card images) appears clickable but has no visible effect on the product thumbnails.
**Steps to reproduce:**
1. Install website_sale and open /shop.
2. Open the web editor and select the shop page.
3. Locate the "Fill" button group in the right panel (with the two svg icons).
4. Click the alternate option to switch between cover and contain.
5. Observe that the product card thumbnails do not change appearance.
**Current behavior:**
The toggle flips the `o_wsale_context_thumb_cover` class on the products table (and the activation of the `products_thumb_cover` view), but the product images keep rendering with `object-fit: contain` regardless of the toggle state.
**Expected behavior:**
The image fill mode follows the toggle:
- "cover" option active → product image uses `object-fit: cover`
- "cover" option inactive → product image uses `object-fit: contain`
**Cause of the issue:**
The product image template renders the img with the `object-fit-contain` utility class, and the local SCSS rule declares
`.object-fit-contain { object-fit: contain !important; }`. The CSS variable `--o-wsale-card-thumb-fill-mode` (set to `cover` by `.o_wsale_context_thumb_cover`) does cascade down to the img, but the non-variable, `!important` rule on the utility class always wins, so the variable-driven rule
`object-fit: var(--o-wsale-card-thumb-fill-mode, contain)` is silently overridden and the toggle becomes inert.
**Fix:**
Making the `.object-fit-contain` rule read the same CSS variable lets the existing toggle mechanism take effect without changing any template or removing the utility class. Outside the `.o_wsale_context_thumb_cover` context the variable is undefined, so the `var(..., contain)` fallback preserves the prior `contain` behavior for any other consumer of the class. This keeps the change to a single SCSS line, with no XML touched and no other CSS class semantics altered.
opw-6231432This 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.