Daily updates from Odoo
Navigate
Branch
Thursday, May 14, 2026
115 changes
19 changes
Resolved issues and error corrections
This update corrects a discrepancy in how ARCA-related invoices (document types 51-59) are displayed. The change ensures the documents align with current ARCA regulations and avoids potential issues with tax reporting. This update maintains backward compatibility with existing ARCA validations.
Original PR description
**Context:** * ARCA (formerly AFIP) has deprecated the "Documentos M" classification for document types with codes 51-59. * These are now classified as "Documentos A con leyenda 'Operación sujeta a…
**Context:** * ARCA (formerly AFIP) has deprecated the "Documentos M" classification for document types with codes 51-59. * These are now classified as "Documentos A con leyenda 'Operación sujeta a retención'" while retaining the same codes for backward compatibility with ARCA validations. **Steps to Reproduce:** * Install `l10n_ar` module. * Go to `Accounting -> Configuration -> Document types`. **Observed behavior:** * Document types 51-59 still display letter "M" and use the old naming convention (e.g. "INVOICES M", "DEBIT MEMOS M"), which no longer reflects the current ARCA classification. **Fix:** * Updated `name` fields to include the "WITH LEGEND" / "CON LEYENDA" suffix. * Changed `l10n_ar_letter` from "M" to "A" so the PDF header renders an "A". * Changed `doc_code_prefix` from `*-M` to `*-A` (FA-A, ND-A, NC-A, RE-A). * The existing `res.config.settings` option for injecting the PDF legend remains untouched. Sources: - ARCA: https://www.afip.gob.ar/facturacion/regimen-general/comprobantes.asp Ref: https://www.odoo.com/mail/message/1025488740 opw-5953504 Forward-Port-Of: odoo/odoo#254975
This update resolves an issue where reports would fail when the fiscal year ended on February 29th. The fix ensures that the system correctly handles leap year fiscal years, defaulting to March 1st for calculations. This prevents reporting errors and ensures accurate financial data.
Original PR description
**Steps to Reproduce:** 1. Install the Accounting module. 2. Go to Settings and set the fiscal year's last day to 29 February. 3. Accounting > Reporting > open any report. **Error:** `ValueError - day is out of range for month` **Cause:** At [1], a fixed year (2025) is used to compute the fiscal year end. However, 2025 is not a leap year, so creating a date with February 29 raises an error. **Fix:** Ensure that when the fiscal year’s last day is Feb 29, a leap year (2024) is used for the computation. For all other dates, the year remains unchanged (2025). As a result; - If the last day is February **28** (non-leap year) -> `fy_start` becomes **March 1** - If the last day is February **29** (leap year) -> `fy_start` also becomes **March 1** [1] - https://github.com/odoo/enterprise/blob/4fa1c0c13308bd8de06646543391f8cbcf28d05e/account_reports/models/account_report.py#L820 sentry-7438598965 Forward-Port-Of: odoo/enterprise#115400
This update resolves an issue that prevented users from creating quality checks when a product wasn't specified during the quality point setup. The fix ensures that the system handles missing product information gracefully, preventing a ValueError and allowing quality checks to be created successfully. This improves the reliability of the quality control process.
Original PR description
When creating a quality check from a quality point, a traceback occurs if no product is set. Steps to reproduce the error: - Install ``quality_control`` module with demo data - Go to Quality > Quality Control > Control Points > Create a new Control point > Set Control per: Quantity, Partial Test: 99 > Save - Click on Quality Checks smart button > Click on New Traceback: ```py ValueError: Expected singleton: uom.uom() ``` https://github.com/odoo/enterprise/blob/4fa1c0c13308bd8de06646543391f8cbcf28d05e/quality_control/models/quality.py#L369 During creation of a quality check, ``product_id`` is not set. The compute method ``_compute_qty_to_test`` accesses ``product_id.uom_id``, which leads to the above traceback. sentry-7440188763 Forward-Port-Of: odoo/enterprise#115292
This update resolves an issue that occurred when installing the Saudi Arabia EDI module, specifically during demo data setup. The problem arose from deleting demo invoices, which triggered an error when the system attempted to update records. The fix ensures the system handles missing records gracefully, preventing the error and allowing users to successfully install and utilize the module.
Original PR description
Currently, error occurs when user tries to install Saudi Arabia EDI module. Steps to replicate: - Install `l10n_sa` with demo and switch to SA company. - Open Invoices > `INV/2026/00001` > Reset to…
Currently, error occurs when user tries to install Saudi Arabia EDI module.
Steps to replicate:
- Install `l10n_sa` with demo and switch to SA company.
- Open Invoices > `INV/2026/00001` > Reset to draft > Delete.
- Open Invoices > `INV/2026/00002` > Reset to draft > Delete.
- Install `l10n_sa_edi`.
Error:
```
File '/home/odoo/src/odoo/saas-19.2/addons/l10n_sa_edi/demo/account_demo.py', line 16, in _l10n_sa_edi_onboard_sa_sale_demo
self.ref('demo_sa_invoice_1', raise_if_not_found=False)
TypeError: unsupported operand type(s) for +: 'NoneType' and 'NoneType'
```
Cause:
- As the user deleted `INV/2026/00001` (linked to `demo_sa_invoice_1`) and `INV/2026/00002` (linked to `demo_sa_invoice_2`), [here] when we try to create a recordlist to update we get this error.
Solution:
- Avoided direct concatenation of `self.ref(...)`, which may return None.
- Iterated over the expected IDs, fetched records safely, and skipped missing ones before processing.
[here]: https://github.com/odoo/odoo/blob/b8bcaa6af2531f49654d804231942b6af2261933/addons/l10n_sa_edi/demo/account_demo.py#L15-L20
sentry-7458234787
---
I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
Forward-Port-Of: odoo/odoo#262666A technical issue preventing background video previews was resolved. The commit removed a broken Vimeo video link from the system, preventing error messages when users selected background videos. This ensures a smoother experience for website builders.
Original PR description
Steps to reproduce: 1. Drop any snippet. 2. Click on the background video option. 3. Observe Traceback. The Vimeo video with ID `499761556` is no longer available, causing a traceback when opening the background video options. This commit removes the unavailable video from the preview list. task-6088772 Forward-Port-Of: odoo/odoo#264080 Forward-Port-Of: odoo/odoo#263555
This update fixes an issue where discount lines in Czech VAT summary reports were incorrectly calculating values. The root cause was a conversion process that was incorrectly handling negative balances. The fix ensures accurate reporting of VAT amounts, particularly for invoices with discounts.
Original PR description
Step to reproduce: - install l10n_cz_reports_2025 and switch to cz company - create a invoice, with cz company ( as partner), of 100. - when adding products, add "Transaction code" (optional fields) to "Goods" - Add discount line, set to -10, add "Transaction code" in this line too. - confirm it Observation: - invoice is 90$ - open vies summary report for this year - value turn out to 110 Cause: - commit [1](https://github.com/odoo/enterprise/commit/892268c44b1bbc838a9f03ef36a079bfff625ca6) converts every balance to +ve and only negate it, in case of refund - in case of discount lines, price is -ve, ABS() turn it to +ve and value comes out to be wrong Fix: - instead of applying ABS() directly, we flip the signs only for out_* moves, in short when a account is credited, its balance is < 0 then we flip its sign opw- 5979262 Forward-Port-Of: odoo/enterprise#117038 Forward-Port-Of: odoo/enterprise#113087
This update fixes a minor discrepancy in the Norwegian tax settings. The tax rate for code 32 was incorrectly set to 11.0. This change ensures accurate tax calculations for Norwegian businesses using Odoo, aligning with official tax regulations. This was coordinated with a related Enterprise PR.
Original PR description
The tax rate(`amount`) for code 32 was mistakenly set to '11.0'. To properly align with the official Norwegian tax rates, it needs to be updated to '11.11'. Related Enterprise PR: https://github.com/odoo/enterprise/pull/110792 task-6033027 Forward-Port-Of: odoo/odoo#264221 Forward-Port-Of: odoo/odoo#258390
This update corrects errors in the Norwegian VAT XML export that were preventing successful validation by Skatteetaten (the Norwegian tax authority). The changes ensure accurate decimal formatting, mathematical calculations, and required legal notes are included, allowing VAT returns to pass government scrutiny. This resolves a critical issue impacting accurate tax reporting.
Original PR description
Before commit: The Norwegian VAT XML export fails Skatteetaten validation due to incorrect decimal formatting, mathematical rounding mismatches between base and tax amounts, missing mandatory legal…
Before commit: The Norwegian VAT XML export fails Skatteetaten validation due to incorrect decimal formatting, mathematical rounding mismatches between base and tax amounts, missing mandatory legal notes, and invalid KID number formats. Fix: To strictly follow Skatteetaten validation rules for the Norway VAT XML, the following changes were implemented: - Ensured standard rates drop the decimal (e.g, `25.0` to `25`), and formatted fractional rates like `11.11` to `11,11` in XML. - Rounded down the `tax_amount` to align precisely with government mathematical expectations. - `base_amount` converted into absolute value to ensuring the calculation (`base * rate = tax`) resolves perfectly. - Add the mandatory `<merknad>` explaining the reverse charge method for codes 81, 83, 86, 88, and 91. - Clean the `company_kid` by safely stripping the 'NO' prefix, and 'MVA' suffix. Expect: The generated XML payload now adheres perfectly to Skatteetaten's strict structural and mathematical rules, allowing the VAT return to pass government validations successfully. Related Community PR: https://github.com/odoo/odoo/pull/258390 Task-6033027 Forward-Port-Of: odoo/enterprise#117168 Forward-Port-Of: odoo/enterprise#110792
This update resolves an issue where Ctrl+A selection in the HTML editor would crash when used with images that had captions. The fix ensures the selection correctly targets the editable content, regardless of whether it's an image or a caption, improving the user experience and preventing unexpected errors.
Original PR description
#### Description of the issue this PR addresses: - When an image with caption is selected, it is wrapped in a `<figure>`, making `<figure>` the anchor node - `selectAll` was resolving the container using `[contenteditable]`, which keeps `<figure>` as the container even though it is `contenteditable=false` - This leads to `<figure>` being passed to `getDeepestEditablePosition`, which cannot resolve a valid `nodeLevelAncestor` and returns null, causing a traceback #### Desired behavior after PR is merged: - `selectAll` now targets the nearest `contenteditable=true` ancestor instead of any `[contenteditable]` #### Steps to reproduce: - Add image and enable caption - Select the image - Press Ctrl+A task-6174371 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#261968
This update fixes a limitation in how attachments are uploaded through cron jobs. Previously, a single cron job was restricted to uploading only one attachment at a time. Now, the system allows multiple attachments to be uploaded within a single cron job run, improving efficiency for automated uploads.
Original PR description
make the `limit_time_real > 0` when --limit-time-real-cron=0 --limit-time-real=0 to allow multiple attachments to be uploaded in a single cron job. 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#264328
The 'Waiting for Me' filter in the Sign app was incorrectly fetching all documents instead of filtering those requiring the current user's signature. This update corrects a technical issue related to how the system processes filter criteria, ensuring the filter functions as intended and displays only relevant documents.
Original PR description
When applying the 'Waiting for me' filter in the Sign app, all documents are fetched instead of filtering out documents that do not need the current user's signature. Steps to reproduce: 1) Install…
When applying the 'Waiting for me' filter in the Sign app, all documents are fetched instead of filtering out documents that do not need the current user's signature.
Steps to reproduce:
1) Install sign with demo data
2) Open sign app and remove default filter
3) Add a filter Waiting for me
Observed Behavior:
All the documents are fetched.
Expected Behavior:
Documents should be filtered out to only show those where the current user is a signer.
Root Cause:
Since [commit](https://github.com/odoo/enterprise/pull/76079/changes/8b5048f63f91a38a710b611d17f5cf27fbd0a18a), The `_search_need_my_signature` method returned `NotImplemented` for any operator other than `in` at [1]. While the filter uses `=` at [2]. Following a recent ORM optimization with the mentioned commit, the operators are now standardized as shown
From:
`('need_my_signature', '=', True)]`
To:
`[('need_my_signature', 'in', [True])]`
This means the search method now receives the expected `in` operator. However, the return logic uses a `not in` condition when filtering documents waiting for signature.
As a result, instead of filtering documents, all documents are returned.
[1]- https://github.com/odoo/enterprise/blob/012b42c20b48e8e36298875e3291936e68e72375/sign/models/sign_request.py#L107-L108
[2]- https://github.com/odoo/enterprise/blob/012b42c20b48e8e36298875e3291936e68e72375/sign/views/sign_request_views.xml#L177
Fix:
Corrected the return domain logic to fetch the correct documents.
opw-6026935
Forward-Port-Of: odoo/enterprise#117049
Forward-Port-Of: odoo/enterprise#113760This update resolves a crash within the Odoo website event editor when the event is set as the homepage. The issue stemmed from a missing match case in the event ID retrieval process. By adding a default return value, the editor now functions correctly, ensuring a stable user experience when editing homepage events.
Original PR description
**Description of the issue/feature this PR addresses:** The `WebsiteEvent._getEventObjectId` method lacks a specific match case for the root directory, causing event ID retrieval to fail on the…
**Description of the issue/feature this PR addresses:** The `WebsiteEvent._getEventObjectId` method lacks a specific match case for the root directory, causing event ID retrieval to fail on the homepage. In order to resolve this, I've implemented a default return of 0 when the URL pattern matching fails [following the pattern established by later revisions of this code](https://github.com/odoo/odoo/blob/2199f71070ce3e9a4717eb6b750c14485406f7aa/addons/website_event/static/src/website_builder/event_page_option_plugin.js#L67). **Steps to reproduce bug:** 1. Create an event website 2. Create an event and visit it 3. On the page click Site > Properties 4. Enable `Is Homepage` 5. Return to the homepage of the application and open the editor https://drive.google.com/file/d/1OpCUAp4LJKqkoStciWeJEGVVlR3qpw1R/view?usp=drive_link **Current behavior before PR:** https://drive.google.com/file/d/1c7ACqaQx03mePzJSV_RoPn8mlLWSMa1I/view?usp=drive_link **Desired behavior after PR is merged:** https://drive.google.com/file/d/1L3Ne9h6-yB3v7VbXipjly9OrDSkZvDOu/view?usp=drive_link opw-6101680 Forward-Port-Of: odoo/odoo#263548 Forward-Port-Of: odoo/odoo#258502
This update resolves a bug that caused invoices with specific address configurations to fail during the cash rounding process. The fix ensures the correct partner information is used when applying cash rounding, preventing data deletion and ensuring accurate invoice processing. This improves stability and reliability for invoicing operations.
Original PR description
When applying a cash rounding with 'biggest tax' strategy, it happens that we end up with a MissingError when the invoice's partner is not defined as commercial_partner_id. Steps: - Install…
When applying a cash rounding with 'biggest tax' strategy, it happens that we end up with a MissingError when the invoice's partner is not defined as commercial_partner_id. Steps: - Install membership module - Create a cash rounding with the 'biggest tax' strategy and 0.05 rounding - Enable customer addresses and create a partner P with an invoice address I - Create an invoice, select I as customer (P will be assigned as delivery address but this is not relevant) - Add an invoice line for 100.03 and any tax and apply the cash rounding - Confirm -> MissingError: record has been deleted Cause: - When creating the cash rounding lines, we set the `partner_id` from the invoice's partner (in our case partner I, which has P as `commercial_partner_id`). - When posting the invoice we look for lines that have partner id different than the invoice's commercial partner id and we call the write method to set the commercial partner id instead https://github.com/odoo/odoo/blob/832165841f66675c0238652c5b0e5e0b6f75ca43/addons/account/models/account_move.py#L5234-L5239 - In some cases, for example in the `membership` module, the override of the write method calls the super() before using `self`. https://github.com/odoo/odoo/blob/832165841f66675c0238652c5b0e5e0b6f75ca43/addons/membership/models/account_move.py#L45-L49 But the super triggers the `_sync_tax_lines` mechanism, during which the rounding line in deleted https://github.com/odoo/odoo/blob/832165841f66675c0238652c5b0e5e0b6f75ca43/addons/account/models/account_tax.py#L3102-L3110 https://github.com/odoo/odoo/blob/832165841f66675c0238652c5b0e5e0b6f75ca43/addons/account/models/account_move.py#L3113-L3114 Therefore `self` doesn't exist anymore when comming back in the override Fix: Setting the commercial partner on the rounding line to avoid calling the write method opw-6128868 Forward-Port-Of: odoo/odoo#262759
This update fixes a potential issue where users could accidentally assign multiple POS shops to a single cash payment method. Now, the system will prevent this, ensuring accurate payment tracking and avoiding errors when processing transactions. This improves data integrity and simplifies the payment process.
Original PR description
**Before this commit** The user will be able to assign two different POS shop to a cash payment method by going to POS -> Configuration -> Payment Methods -> Cash -> Point of sale, this will not raise a validation error when they try to save it but it will prevent the user from opening the POS session. **After this commit** It will raise a validation error if a user tries to assign more than one POS shop to one cash payment method and save it. opw-6015025 Forward-Port-Of: odoo/odoo#252603
This update resolves an issue where users could create attachments that pointed back to themselves, leading to errors. The fix prevents attachments from being linked to themselves in the user interface and during data writing, ensuring data integrity and preventing system crashes. This improves stability and reliability.
Original PR description
Currently, users have the option to attach an ir.attachment to itself. This causes a recursion depth error when accessing attachments. This commit prevents this in the UI and the write. Firstly, the ir.attachment does not show itself in the dropdown when selecting the resource ID. Second, the write raises a UserError if attempting to write an ir.attachment with the same ID as the Resource ID. Steps to reproduce: 1. Create an attachment and save 2. Set the Resource Model `(res.model)` to "ir.attachment" 3. Select the same attachment in Resource ID `(res_id)` 4. Attempt to view attachments: `RecursionError: maximum recursion depth exceeded` opw-6206075 closes #263591 Forward-Port-Of: odoo/odoo#264439 Forward-Port-Of: odoo/odoo#263591
A test within the l10n_latam_check module failed due to a dependency on the l10n_ar module not being installed. This update ensures the test runs correctly by requiring l10n_ar to be present, resolving a technical error.
Original PR description
Steps to reproduce: 1- Install l10n_latam_check on a fresh database instance 2- Run the test `test_invoice_status_after_voided_check` Issue: `ValueError: External ID not found in the system: l10n_ar.dc_liq_uci_a` Why this happens: The test used a document type from the l10n_ar module, so running the test without it being installed caused an error. runbot-243341 Forward-Port-Of: odoo/odoo#262800
This update ensures Odoo's audit trail feature in India (l10n_in) complies with Ministry of Corporate Affairs regulations. Previously, the audit trail could be disabled, but this change permanently restricts deactivation, guaranteeing ongoing compliance and data integrity for Indian users. This is a critical fix for businesses operating in India.
Original PR description
After the refactor introduced in https://github.com/odoo/odoo/commit/f280f762b6417fa1a0b09649ffbdecafcc7e7579, The audit trail feature was split into two modes: a lightweight general-purpose mode and a force-restricted mode for specific localizations (e.g., Germany), where deactivation is not allowed once enabled. In India, as per the requirements of the Ministry of Corporate Affairs, the audit trail must be maintained and cannot be disabled once activated. This commit extends the force-restricted audit trail mode to the Indian localization (l10n_in) to ensure compliance with statutory requirements. task-6182002 Forward-Port-Of: odoo/odoo#264569 Forward-Port-Of: odoo/odoo#262508
This update corrects inaccuracies in the French Chart of Accounts translations within the Odoo accounting module. The fix ensures that financial reports and data displayed in French adhere to the correct accounting standards, improving accuracy and compliance.
Original PR description
task-6210436
This update resolves an issue where dragging calendar events on touch screens would cause the application to crash. Now, dragging and releasing events works smoothly on both touch and mouse devices, improving the user experience for all calendar users.
Original PR description
When using the Calendar app on a touch screen, dragging an event and releasing it would raise a client error. Releasing a dragged event now works smoothly on both mouse and touch devices. task-6124833 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#263361
22 changes
New functionality added to Odoo
This update allows users to easily insert their personalized signature into emails directly within the HTML editor. This improves email communication by allowing users to add a professional touch. The existing signature functionality for Email Marketing & Knowledge remains unchanged.
Original PR description
Purpose of this PR: - Add a new Signature command to insert the user's profile signature defined in user preferences. This is handled by UserSignaturePlugin and and is part of the main editor plugins. - Keep the existing Signature plugin restricted to Email Marketing & Knowledge. task-6127297 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#260279
Resolved issues and error corrections
This update corrects a discrepancy in how ARCA-related documents are displayed in Odoo. The system has been updated to align with recent ARCA regulations, ensuring accurate reporting and compliance. The changes update document names and codes to reflect the new 'Operation subject to withholding' classification.
Original PR description
**Context:** * ARCA (formerly AFIP) has deprecated the "Documentos M" classification for document types with codes 51-59. * These are now classified as "Documentos A con leyenda 'Operación sujeta a…
**Context:** * ARCA (formerly AFIP) has deprecated the "Documentos M" classification for document types with codes 51-59. * These are now classified as "Documentos A con leyenda 'Operación sujeta a retención'" while retaining the same codes for backward compatibility with ARCA validations. **Steps to Reproduce:** * Install `l10n_ar` module. * Go to `Accounting -> Configuration -> Document types`. **Observed behavior:** * Document types 51-59 still display letter "M" and use the old naming convention (e.g. "INVOICES M", "DEBIT MEMOS M"), which no longer reflects the current ARCA classification. **Fix:** * Updated `name` fields to include the "WITH LEGEND" / "CON LEYENDA" suffix. * Changed `l10n_ar_letter` from "M" to "A" so the PDF header renders an "A". * Changed `doc_code_prefix` from `*-M` to `*-A` (FA-A, ND-A, NC-A, RE-A). * The existing `res.config.settings` option for injecting the PDF legend remains untouched. Sources: - ARCA: https://www.afip.gob.ar/facturacion/regimen-general/comprobantes.asp Ref: https://www.odoo.com/mail/message/1025488740 opw-5953504 Forward-Port-Of: odoo/odoo#254975
A technical issue preventing users from selecting a background video from Vimeo was resolved. This commit removed a broken video link from the preview options, ensuring a smooth user experience when setting background videos on the website. This improves the functionality of the website builder.
Original PR description
Steps to reproduce: 1. Drop any snippet. 2. Click on the background video option. 3. Observe Traceback. The Vimeo video with ID `499761556` is no longer available, causing a traceback when opening the background video options. This commit removes the unavailable video from the preview list. task-6088772 Forward-Port-Of: odoo/odoo#264080 Forward-Port-Of: odoo/odoo#263555
This update resolves an issue where changes made on a POS ticket screen weren't being reprinted correctly. The fix corrects the underlying logic to ensure all previous order modifications are accurately reflected when the 'reprint all changes' function is used. This improves the reliability of printed POS tickets.
Original PR description
Steps: ---------- - Install point_of_sale. - Open a POS session with a preparation printer configured. - Process an order with two different changes. - Open the ticket screen and try to reprint all previous changes. Issue: ---------- - No changes are printed. Cause: ---------- - Incorrect logic used when reprinting all changes. Fix: ---------- - Correct the logic to properly reprint all previous changes. Task-6008291
This update fixes an issue where discount lines in Czech VAT reports (vies) were incorrectly calculated. The previous method of using ABS() on negative values resulted in inflated report totals. The fix now correctly handles negative discount amounts, ensuring accurate VAT reporting.
Original PR description
Step to reproduce: - install l10n_cz_reports_2025 and switch to cz company - create a invoice, with cz company ( as partner), of 100. - when adding products, add "Transaction code" (optional fields) to "Goods" - Add discount line, set to -10, add "Transaction code" in this line too. - confirm it Observation: - invoice is 90$ - open vies summary report for this year - value turn out to 110 Cause: - commit [1](https://github.com/odoo/enterprise/commit/892268c44b1bbc838a9f03ef36a079bfff625ca6) converts every balance to +ve and only negate it, in case of refund - in case of discount lines, price is -ve, ABS() turn it to +ve and value comes out to be wrong Fix: - instead of applying ABS() directly, we flip the signs only for out_* moves, in short when a account is credited, its balance is < 0 then we flip its sign opw- 5979262 Forward-Port-Of: odoo/enterprise#117038 Forward-Port-Of: odoo/enterprise#113087
The 'Waiting for Me' filter in the Sign app was incorrectly fetching all documents instead of filtering those requiring the current user's signature. This update corrects a technical issue related to how the system processes filter criteria, ensuring the filter functions as intended and only displays relevant documents. This improves the usability of the Sign app.
Original PR description
When applying the 'Waiting for me' filter in the Sign app, all documents are fetched instead of filtering out documents that do not need the current user's signature. Steps to reproduce: 1) Install…
When applying the 'Waiting for me' filter in the Sign app, all documents are fetched instead of filtering out documents that do not need the current user's signature.
Steps to reproduce:
1) Install sign with demo data
2) Open sign app and remove default filter
3) Add a filter Waiting for me
Observed Behavior:
All the documents are fetched.
Expected Behavior:
Documents should be filtered out to only show those where the current user is a signer.
Root Cause:
Since [commit](https://github.com/odoo/enterprise/pull/76079/changes/8b5048f63f91a38a710b611d17f5cf27fbd0a18a), The `_search_need_my_signature` method returned `NotImplemented` for any operator other than `in` at [1]. While the filter uses `=` at [2]. Following a recent ORM optimization with the mentioned commit, the operators are now standardized as shown
From:
`('need_my_signature', '=', True)]`
To:
`[('need_my_signature', 'in', [True])]`
This means the search method now receives the expected `in` operator. However, the return logic uses a `not in` condition when filtering documents waiting for signature.
As a result, instead of filtering documents, all documents are returned.
[1]- https://github.com/odoo/enterprise/blob/012b42c20b48e8e36298875e3291936e68e72375/sign/models/sign_request.py#L107-L108
[2]- https://github.com/odoo/enterprise/blob/012b42c20b48e8e36298875e3291936e68e72375/sign/views/sign_request_views.xml#L177
Fix:
Corrected the return domain logic to fetch the correct documents.
opw-6026935
Forward-Port-Of: odoo/enterprise#116985
Forward-Port-Of: odoo/enterprise#113760This update fixes a minor discrepancy in the Norwegian tax settings. The tax code 32's rate was incorrectly set to 11.0. This change ensures accurate tax calculations for Norwegian businesses using Odoo, aligning with official tax regulations. This was coordinated with a related Enterprise PR.
Original PR description
The tax rate(`amount`) for code 32 was mistakenly set to '11.0'. To properly align with the official Norwegian tax rates, it needs to be updated to '11.11'. Related Enterprise PR: https://github.com/odoo/enterprise/pull/110792 task-6033027 Forward-Port-Of: odoo/odoo#264221 Forward-Port-Of: odoo/odoo#258390
This update resolves issues preventing Odoo's Norwegian VAT XML reports from passing validation by Skatteetaten. The changes ensure correct decimal formatting, mathematical calculations, and required legal notes are included, guaranteeing accurate VAT returns and avoiding potential delays or penalties. This update directly addresses a critical requirement for compliance.
Original PR description
Before commit: The Norwegian VAT XML export fails Skatteetaten validation due to incorrect decimal formatting, mathematical rounding mismatches between base and tax amounts, missing mandatory legal…
Before commit: The Norwegian VAT XML export fails Skatteetaten validation due to incorrect decimal formatting, mathematical rounding mismatches between base and tax amounts, missing mandatory legal notes, and invalid KID number formats. Fix: To strictly follow Skatteetaten validation rules for the Norway VAT XML, the following changes were implemented: - Ensured standard rates drop the decimal (e.g, `25.0` to `25`), and formatted fractional rates like `11.11` to `11,11` in XML. - Rounded down the `tax_amount` to align precisely with government mathematical expectations. - `base_amount` converted into absolute value to ensuring the calculation (`base * rate = tax`) resolves perfectly. - Add the mandatory `<merknad>` explaining the reverse charge method for codes 81, 83, 86, 88, and 91. - Clean the `company_kid` by safely stripping the 'NO' prefix, and 'MVA' suffix. Expect: The generated XML payload now adheres perfectly to Skatteetaten's strict structural and mathematical rules, allowing the VAT return to pass government validations successfully. Related Community PR: https://github.com/odoo/odoo/pull/258390 Task-6033027 Forward-Port-Of: odoo/enterprise#117168 Forward-Port-Of: odoo/enterprise#110792
This update resolves a bug that caused the image editor to crash when users tried to select all content with Ctrl+A when an image had a caption. The fix ensures the selection process correctly identifies the editable area, specifically targeting the nearest contenteditable element instead of the entire figure tag. This improves stability and usability for users working with images and captions.
Original PR description
#### Description of the issue this PR addresses: - When an image with caption is selected, it is wrapped in a `<figure>`, making `<figure>` the anchor node - `selectAll` was resolving the container using `[contenteditable]`, which keeps `<figure>` as the container even though it is `contenteditable=false` - This leads to `<figure>` being passed to `getDeepestEditablePosition`, which cannot resolve a valid `nodeLevelAncestor` and returns null, causing a traceback #### Desired behavior after PR is merged: - `selectAll` now targets the nearest `contenteditable=true` ancestor instead of any `[contenteditable]` #### Steps to reproduce: - Add image and enable caption - Select the image - Press Ctrl+A task-6174371 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#261968
This update fixes an issue where packaging unit information was missing from delivery slip reports after a transfer was validated. Previously, the system didn't correctly display the packaging unit quantity. Now, the delivery slip accurately reflects the packaging unit and its quantity, even after the transfer is validated, ensuring accurate reporting of product movements.
Original PR description
Issue before this commit: ========================= For products tracked by serial/lot with packaging units, the delivery slip correctly shows the packaging unit and quantity before validating the…
Issue before this commit: ========================= For products tracked by serial/lot with packaging units, the delivery slip correctly shows the packaging unit and quantity before validating the transfer. However, after validating the transfer, the packaging unit and its corresponding quantity are no longer displayed in the delivery slip report. Steps to Reproduce: ========================= 1. Install stock and sale_management modules. 2. Enable Units of Measure & Packagings and Display Lots & Serial Numbers on Delivery Slips from settings. 3. Create a product with tracking by lot/serial number and configure a packaging unit. 4. Create a SO using this product with a packaging unit and confirm it. 5. Open the related transfer and print the delivery slip before and after validation. Cause of the Issue: ========================= The delivery slip report template (stock_report_delivery_has_serial_move_line) does not display packaging unit information after validation for move lines when the packaging unit differs from the product unit of measure. With This Commit: ========================= This commit ensures that packaging units and their corresponding quantities are displayed on the delivery slip after validation when the packaging unit differs from the product unit of measure. Steps To Reporduce: [Video Link](https://drive.google.com/file/d/10DmFKW1Y_Tm-AyKzPrqtFMY8orBkKbIm/view?usp=sharing) opw-6142052 Forward-Port-Of: odoo/odoo#262722
A technical issue causing a 'singleton' error when generating time off reports for employees was resolved. This fix ensures the 'By Employee' reporting feature under time off functionality works correctly, preventing disruptions to payroll and reporting processes. This update improves the reliability of the French company's time off reporting.
Original PR description
A singleton error appears when opening the "By Employee" report under Time Off. **Steps to reproduce:** - Install the l10n_fr_hr_holidays module. - Switch to the French company. - Open any employee record. - Set Working Hours (resource_calendar_id) to empty. - Set Hours Per Week. - Create a time off request for any past date. - Go to Reporting → By Employee. Task:-6043142 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
This update fixes a limitation in how Odoo handles attachments uploaded through its automated cron jobs. Previously, a single cron job was restricted to uploading only one attachment at a time. Now, the system allows multiple attachments to be uploaded within a single cron job run, improving efficiency and reducing the need for multiple uploads.
Original PR description
make the `limit_time_real > 0` when --limit-time-real-cron=0 --limit-time-real=0 to allow multiple attachments to be uploaded in a single cron job. 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#264328
This update ensures Odoo's audit trail feature remains enabled in India, aligning with Ministry of Corporate Affairs requirements. Previously, the audit trail could be disabled, but this change enforces its continuous maintenance as mandated by law. This ensures compliance and reduces potential legal risks.
Original PR description
After the refactor introduced in https://github.com/odoo/odoo/commit/f280f762b6417fa1a0b09649ffbdecafcc7e7579, The audit trail feature was split into two modes: a lightweight general-purpose mode and a force-restricted mode for specific localizations (e.g., Germany), where deactivation is not allowed once enabled. In India, as per the requirements of the Ministry of Corporate Affairs, the audit trail must be maintained and cannot be disabled once activated. This commit extends the force-restricted audit trail mode to the Indian localization (l10n_in) to ensure compliance with statutory requirements. task-6182002 Forward-Port-Of: odoo/odoo#264508 Forward-Port-Of: odoo/odoo#262508
This update resolves a test failure in the 'pos_self_order' module that occurred due to how order slots were being generated. The fix freezes the time to '00:00' to ensure all available slots are considered, preventing the test from failing on specific days. This ensures consistent test results and reliable order scheduling.
Original PR description
Before this commit: = - The test test_slot_limit_orders created slots only for the first day of the week (Monday). - The test scenario includes a slot at "18:00". - On Mondays, the test fails between 18:01 and 23:59 because the "18:00" slot no longer exists for the current day. - On other days, the test passes since slots are generated for the upcoming Monday. After this commit: = - Freezed the time to current day at "00:00" so that slot list can have every slot for that day. task-6043739 runbot-241836 Forward-Port-Of: odoo/odoo#263198 Forward-Port-Of: odoo/odoo#254775
This update fixes a potential issue where users could accidentally assign multiple POS shops to a single cash payment method. Now, the system prevents this, ensuring accurate payment tracking and avoiding errors when processing transactions. This change enhances the reliability of our point-of-sale system.
Original PR description
**Before this commit** The user will be able to assign two different POS shop to a cash payment method by going to POS -> Configuration -> Payment Methods -> Cash -> Point of sale, this will not raise a validation error when they try to save it but it will prevent the user from opening the POS session. **After this commit** It will raise a validation error if a user tries to assign more than one POS shop to one cash payment method and save it. opw-6015025 Forward-Port-Of: odoo/odoo#252603
This update resolves a crash within the website event editor when the event is set as the homepage. The issue stemmed from a missing match case in the event ID retrieval process. By adding a default return value, the editor now functions correctly, ensuring a stable experience for users managing their events.
Original PR description
**Description of the issue/feature this PR addresses:** The `WebsiteEvent._getEventObjectId` method lacks a specific match case for the root directory, causing event ID retrieval to fail on the…
**Description of the issue/feature this PR addresses:** The `WebsiteEvent._getEventObjectId` method lacks a specific match case for the root directory, causing event ID retrieval to fail on the homepage. In order to resolve this, I've implemented a default return of 0 when the URL pattern matching fails [following the pattern established by later revisions of this code](https://github.com/odoo/odoo/blob/2199f71070ce3e9a4717eb6b750c14485406f7aa/addons/website_event/static/src/website_builder/event_page_option_plugin.js#L67). **Steps to reproduce bug:** 1. Create an event website 2. Create an event and visit it 3. On the page click Site > Properties 4. Enable `Is Homepage` 5. Return to the homepage of the application and open the editor https://drive.google.com/file/d/1OpCUAp4LJKqkoStciWeJEGVVlR3qpw1R/view?usp=drive_link **Current behavior before PR:** https://drive.google.com/file/d/1c7ACqaQx03mePzJSV_RoPn8mlLWSMa1I/view?usp=drive_link **Desired behavior after PR is merged:** https://drive.google.com/file/d/1L3Ne9h6-yB3v7VbXipjly9OrDSkZvDOu/view?usp=drive_link opw-6101680 Forward-Port-Of: odoo/odoo#263548 Forward-Port-Of: odoo/odoo#258502
This change resolves an issue where cash rounding with the 'biggest tax' strategy caused an invoice error when using customer addresses. The fix ensures the correct partner ID is used during invoice processing, preventing data deletion and improving invoice accuracy.
Original PR description
When applying a cash rounding with 'biggest tax' strategy, it happens that we end up with a MissingError when the invoice's partner is not defined as commercial_partner_id. Steps: - Install…
When applying a cash rounding with 'biggest tax' strategy, it happens that we end up with a MissingError when the invoice's partner is not defined as commercial_partner_id. Steps: - Install membership module - Create a cash rounding with the 'biggest tax' strategy and 0.05 rounding - Enable customer addresses and create a partner P with an invoice address I - Create an invoice, select I as customer (P will be assigned as delivery address but this is not relevant) - Add an invoice line for 100.03 and any tax and apply the cash rounding - Confirm -> MissingError: record has been deleted Cause: - When creating the cash rounding lines, we set the `partner_id` from the invoice's partner (in our case partner I, which has P as `commercial_partner_id`). - When posting the invoice we look for lines that have partner id different than the invoice's commercial partner id and we call the write method to set the commercial partner id instead https://github.com/odoo/odoo/blob/832165841f66675c0238652c5b0e5e0b6f75ca43/addons/account/models/account_move.py#L5234-L5239 - In some cases, for example in the `membership` module, the override of the write method calls the super() before using `self`. https://github.com/odoo/odoo/blob/832165841f66675c0238652c5b0e5e0b6f75ca43/addons/membership/models/account_move.py#L45-L49 But the super triggers the `_sync_tax_lines` mechanism, during which the rounding line in deleted https://github.com/odoo/odoo/blob/832165841f66675c0238652c5b0e5e0b6f75ca43/addons/account/models/account_tax.py#L3102-L3110 https://github.com/odoo/odoo/blob/832165841f66675c0238652c5b0e5e0b6f75ca43/addons/account/models/account_move.py#L3113-L3114 Therefore `self` doesn't exist anymore when comming back in the override Fix: Setting the commercial partner on the rounding line to avoid calling the write method opw-6128868 Forward-Port-Of: odoo/odoo#262759
This update resolves an issue where users could create attachments that repeatedly referenced themselves, leading to errors. The fix prevents attachments from being linked to themselves in the user interface and during data writing, ensuring data integrity and stability.
Original PR description
Currently, users have the option to attach an ir.attachment to itself. This causes a recursion depth error when accessing attachments. This commit prevents this in the UI and the write. Firstly, the ir.attachment does not show itself in the dropdown when selecting the resource ID. Second, the write raises a UserError if attempting to write an ir.attachment with the same ID as the Resource ID. Steps to reproduce: 1. Create an attachment and save 2. Set the Resource Model `(res.model)` to "ir.attachment" 3. Select the same attachment in Resource ID `(res_id)` 4. Attempt to view attachments: `RecursionError: maximum recursion depth exceeded` opw-6206075 closes #263591 Forward-Port-Of: odoo/odoo#264439 Forward-Port-Of: odoo/odoo#263591
A test within the l10n_latam_check module failed due to a dependency on the l10n_ar module not being installed. This update ensures the test runs correctly by requiring l10n_ar to be present during execution, preventing a runtime error.
Original PR description
Steps to reproduce: 1- Install l10n_latam_check on a fresh database instance 2- Run the test `test_invoice_status_after_voided_check` Issue: `ValueError: External ID not found in the system: l10n_ar.dc_liq_uci_a` Why this happens: The test used a document type from the l10n_ar module, so running the test without it being installed caused an error. runbot-243341 Forward-Port-Of: odoo/odoo#262800
This update resolves an issue that prevented invoices with combo products lacking taxes from being correctly processed when generating Peru UBL invoices. The fix corrects a validation oversight, ensuring that combo products without taxes now generate invoices without errors. This ensures accurate invoice generation for our Peru UBL customers.
Original PR description
A traceback occurs when sending an invoice to Peru UBL if a combo product invoice line does not have any taxes applied. Steps to reproduce the error: - Install ``l10n_pe_edi`` module with demo data -…
A traceback occurs when sending an invoice to Peru UBL if a combo product invoice line does not have any taxes applied. Steps to reproduce the error: - Install ``l10n_pe_edi`` module with demo data - Switch to PE Company - Create an invoice > Add a Office Combo product > unset the taxes > Confirm - Process now https://github.com/odoo/enterprise/blob/d7f71a68fbd5ff9c7cd52f96e1616671a6b8d77c/l10n_pe_edi/models/account_edi_xml_ubl_pe.py#L549-L552 Here, the ``grouping_key`` becomes ``None`` when no taxes are present on the invoice line. Normally, invoices without taxes are restricted at [1], but combo products are excluded from this validation at [2]. As a result, combo product lines without taxes bypass the restriction and trigger a traceback. [1]: https://github.com/odoo/enterprise/blob/d7f71a68fbd5ff9c7cd52f96e1616671a6b8d77c/l10n_pe_edi/models/account_edi_format.py#L928-L929 [2]: https://github.com/odoo/odoo/blob/42b8852df9b323984364c41a13cf27d19fbe04a7/addons/account/models/account_move_line.py#L3433-L3434 sentry-7430552834 Forward-Port-Of: odoo/enterprise#114798
This update fixes an issue where UBL invoices could incorrectly apply taxes due to differences in fiscal positions. The change ensures that only taxes matching the invoice's fiscal position are used during import, leading to more accurate financial reporting. This improves the reliability of UBL invoice processing.
Original PR description
When importing a UBL invoice, multiple taxes may share the same rate (e.g. 21%) but differ by fiscal position. Without filtering, the wrong tax (e.g. the domestic one for a foreign partner) could be selected. task-6138749 Forward-Port-Of: odoo/odoo#264525 Forward-Port-Of: odoo/odoo#263872
This update resolves an issue where dragging and releasing calendar events on touch screens would cause a browser error. Now, dragging and releasing events works smoothly on both touch and mouse devices, improving the Calendar app's usability for all users.
Original PR description
When using the Calendar app on a touch screen, dragging an event and releasing it would raise a client error. Releasing a dragged event now works smoothly on both mouse and touch devices. task-6124833 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#263361
19 changes
Resolved issues and error corrections
This update corrects a discrepancy in how ARCA-related invoices (document types 51-59) are displayed. The change ensures the documents align with current ARCA regulations by updating naming conventions and PDF headers. This ensures accurate reporting and compliance with Argentinian tax regulations.
Original PR description
**Context:** * ARCA (formerly AFIP) has deprecated the "Documentos M" classification for document types with codes 51-59. * These are now classified as "Documentos A con leyenda 'Operación sujeta a…
**Context:** * ARCA (formerly AFIP) has deprecated the "Documentos M" classification for document types with codes 51-59. * These are now classified as "Documentos A con leyenda 'Operación sujeta a retención'" while retaining the same codes for backward compatibility with ARCA validations. **Steps to Reproduce:** * Install `l10n_ar` module. * Go to `Accounting -> Configuration -> Document types`. **Observed behavior:** * Document types 51-59 still display letter "M" and use the old naming convention (e.g. "INVOICES M", "DEBIT MEMOS M"), which no longer reflects the current ARCA classification. **Fix:** * Updated `name` fields to include the "WITH LEGEND" / "CON LEYENDA" suffix. * Changed `l10n_ar_letter` from "M" to "A" so the PDF header renders an "A". * Changed `doc_code_prefix` from `*-M` to `*-A` (FA-A, ND-A, NC-A, RE-A). * The existing `res.config.settings` option for injecting the PDF legend remains untouched. Sources: - ARCA: https://www.afip.gob.ar/facturacion/regimen-general/comprobantes.asp Ref: https://www.odoo.com/mail/message/1025488740 opw-5953504 Forward-Port-Of: odoo/odoo#254975
This update resolves an issue that prevented invoices with combo products lacking taxes from being correctly processed when generating Peru UBL invoices. The fix corrects a validation error related to the 'grouping_key' field, ensuring these invoices can now be successfully submitted. This improves the reliability of invoice generation for users in Peru.
Original PR description
A traceback occurs when sending an invoice to Peru UBL if a combo product invoice line does not have any taxes applied. Steps to reproduce the error: - Install ``l10n_pe_edi`` module with demo data -…
A traceback occurs when sending an invoice to Peru UBL if a combo product invoice line does not have any taxes applied. Steps to reproduce the error: - Install ``l10n_pe_edi`` module with demo data - Switch to PE Company - Create an invoice > Add a Office Combo product > unset the taxes > Confirm - Process now https://github.com/odoo/enterprise/blob/d7f71a68fbd5ff9c7cd52f96e1616671a6b8d77c/l10n_pe_edi/models/account_edi_xml_ubl_pe.py#L549-L552 Here, the ``grouping_key`` becomes ``None`` when no taxes are present on the invoice line. Normally, invoices without taxes are restricted at [1], but combo products are excluded from this validation at [2]. As a result, combo product lines without taxes bypass the restriction and trigger a traceback. [1]: https://github.com/odoo/enterprise/blob/d7f71a68fbd5ff9c7cd52f96e1616671a6b8d77c/l10n_pe_edi/models/account_edi_format.py#L928-L929 [2]: https://github.com/odoo/odoo/blob/42b8852df9b323984364c41a13cf27d19fbe04a7/addons/account/models/account_move_line.py#L3433-L3434 sentry-7430552834 Forward-Port-Of: odoo/enterprise#114798
A technical issue preventing background video previews was resolved. The commit removed a broken Vimeo video link from the website builder, preventing error messages and ensuring a smooth user experience when selecting background videos. This improves the usability of the website design tool.
Original PR description
Steps to reproduce: 1. Drop any snippet. 2. Click on the background video option. 3. Observe Traceback. The Vimeo video with ID `499761556` is no longer available, causing a traceback when opening the background video options. This commit removes the unavailable video from the preview list. task-6088772 Forward-Port-Of: odoo/odoo#264080 Forward-Port-Of: odoo/odoo#263555
This update fixes an issue where discount lines on invoices were incorrectly calculated in VAT reports. The previous method of using ABS() on negative values resulted in inflated report totals. The fix now correctly handles discount lines by simply flipping the sign of the account balance when it's negative, ensuring accurate reporting.
Original PR description
Step to reproduce: - install l10n_cz_reports_2025 and switch to cz company - create a invoice, with cz company ( as partner), of 100. - when adding products, add "Transaction code" (optional fields) to "Goods" - Add discount line, set to -10, add "Transaction code" in this line too. - confirm it Observation: - invoice is 90$ - open vies summary report for this year - value turn out to 110 Cause: - commit [1](https://github.com/odoo/enterprise/commit/892268c44b1bbc838a9f03ef36a079bfff625ca6) converts every balance to +ve and only negate it, in case of refund - in case of discount lines, price is -ve, ABS() turn it to +ve and value comes out to be wrong Fix: - instead of applying ABS() directly, we flip the signs only for out_* moves, in short when a account is credited, its balance is < 0 then we flip its sign opw- 5979262 Forward-Port-Of: odoo/enterprise#117038 Forward-Port-Of: odoo/enterprise#113087
This update fixes an issue where packaging unit information was hidden on delivery slips after a transfer was validated. Previously, users wouldn't see the packaging unit quantity on the report. Now, the delivery slip accurately reflects the packaging unit and its quantity, even after the transfer is validated, ensuring accurate reporting of stock movements.
Original PR description
Issue before this commit: ========================= For products tracked by serial/lot with packaging units, the delivery slip correctly shows the packaging unit and quantity before validating the…
Issue before this commit: ========================= For products tracked by serial/lot with packaging units, the delivery slip correctly shows the packaging unit and quantity before validating the transfer. However, after validating the transfer, the packaging unit and its corresponding quantity are no longer displayed in the delivery slip report. Steps to Reproduce: ========================= 1. Install stock and sale_management modules. 2. Enable Units of Measure & Packagings and Display Lots & Serial Numbers on Delivery Slips from settings. 3. Create a product with tracking by lot/serial number and configure a packaging unit. 4. Create a SO using this product with a packaging unit and confirm it. 5. Open the related transfer and print the delivery slip before and after validation. Cause of the Issue: ========================= The delivery slip report template (stock_report_delivery_has_serial_move_line) does not display packaging unit information after validation for move lines when the packaging unit differs from the product unit of measure. With This Commit: ========================= This commit ensures that packaging units and their corresponding quantities are displayed on the delivery slip after validation when the packaging unit differs from the product unit of measure. Steps To Reporduce: [Video Link](https://drive.google.com/file/d/10DmFKW1Y_Tm-AyKzPrqtFMY8orBkKbIm/view?usp=sharing) opw-6142052 Forward-Port-Of: odoo/odoo#262722
A test for the Point of Sale receipt generation process failed due to a generic selector used to identify the shipping date. This update adds a specific class to the shipping date element, ensuring the test accurately reflects the receipt format across different localization settings. This resolves a technical issue that could have impacted receipt accuracy.
Original PR description
Issue: ====== - The test used the selector `.pos-receipt-order-data div` to retrieve the shipping date. - This selector is not specific and matches different elements depending on localization. Fix: ==== - Add a specific class `shipping-date` to the shipping date element and update the test to use `.pos-receipt-order-data .shipping-date` to avoid incorrect matches. Task-6183114 Error-241995 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#262761
This update fixes a minor error in the Norwegian tax settings. The tax code 32's rate was incorrectly set to 11.0. This change ensures accurate tax calculations for Norwegian businesses using Odoo, aligning with official tax regulations. This was coordinated with a related Enterprise PR.
Original PR description
The tax rate(`amount`) for code 32 was mistakenly set to '11.0'. To properly align with the official Norwegian tax rates, it needs to be updated to '11.11'. Related Enterprise PR: https://github.com/odoo/enterprise/pull/110792 task-6033027 Forward-Port-Of: odoo/odoo#264221 Forward-Port-Of: odoo/odoo#258390
This update corrects errors in the Norwegian VAT XML export that were preventing successful validation by the Skatteetaten (Norwegian tax authority). The changes ensure accurate decimal formatting, mathematical calculations, and required legal notes are included, allowing VAT returns to pass government scrutiny. This resolves a critical issue impacting accurate tax reporting.
Original PR description
Before commit: The Norwegian VAT XML export fails Skatteetaten validation due to incorrect decimal formatting, mathematical rounding mismatches between base and tax amounts, missing mandatory legal…
Before commit: The Norwegian VAT XML export fails Skatteetaten validation due to incorrect decimal formatting, mathematical rounding mismatches between base and tax amounts, missing mandatory legal notes, and invalid KID number formats. Fix: To strictly follow Skatteetaten validation rules for the Norway VAT XML, the following changes were implemented: - Ensured standard rates drop the decimal (e.g, `25.0` to `25`), and formatted fractional rates like `11.11` to `11,11` in XML. - Rounded down the `tax_amount` to align precisely with government mathematical expectations. - `base_amount` converted into absolute value to ensuring the calculation (`base * rate = tax`) resolves perfectly. - Add the mandatory `<merknad>` explaining the reverse charge method for codes 81, 83, 86, 88, and 91. - Clean the `company_kid` by safely stripping the 'NO' prefix, and 'MVA' suffix. Expect: The generated XML payload now adheres perfectly to Skatteetaten's strict structural and mathematical rules, allowing the VAT return to pass government validations successfully. Related Community PR: https://github.com/odoo/odoo/pull/258390 Task-6033027 Forward-Port-Of: odoo/enterprise#117168 Forward-Port-Of: odoo/enterprise#110792
This update ensures Odoo's audit trail feature remains active in India, aligning with Ministry of Corporate Affairs requirements. Previously, the audit trail could be disabled, but this change enforces its continuous maintenance to meet legal obligations. This ensures compliance and reduces potential risks for users in the Indian market.
Original PR description
After the refactor introduced in https://github.com/odoo/odoo/commit/f280f762b6417fa1a0b09649ffbdecafcc7e7579, The audit trail feature was split into two modes: a lightweight general-purpose mode and a force-restricted mode for specific localizations (e.g., Germany), where deactivation is not allowed once enabled. In India, as per the requirements of the Ministry of Corporate Affairs, the audit trail must be maintained and cannot be disabled once activated. This commit extends the force-restricted audit trail mode to the Indian localization (l10n_in) to ensure compliance with statutory requirements. task-6182002 Forward-Port-Of: odoo/odoo#262508
This update resolves an issue where Ctrl+A wouldn't select images with captions in the HTML editor. The fix ensures that the selection correctly targets the image itself, regardless of the surrounding caption structure, preventing a crash. This improves the user experience when working with images and captions.
Original PR description
#### Description of the issue this PR addresses: - When an image with caption is selected, it is wrapped in a `<figure>`, making `<figure>` the anchor node - `selectAll` was resolving the container using `[contenteditable]`, which keeps `<figure>` as the container even though it is `contenteditable=false` - This leads to `<figure>` being passed to `getDeepestEditablePosition`, which cannot resolve a valid `nodeLevelAncestor` and returns null, causing a traceback #### Desired behavior after PR is merged: - `selectAll` now targets the nearest `contenteditable=true` ancestor instead of any `[contenteditable]` #### Steps to reproduce: - Add image and enable caption - Select the image - Press Ctrl+A task-6174371 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#261968
This update resolves a technical issue preventing the Journal Audit report from displaying correctly when the 'Load More Limit' is set to 1. The fix ensures accurate report generation by addressing a key error related to data formatting during report expansion.
Original PR description
Steps to reproduce: - Install `Accounting` module - Accounting > Configuration > Accounting Reports > Journal Report > Options > Set `Load More Limit` to 1 - Accounting > Review > Journal Audit >…
Steps to reproduce:
- Install `Accounting` module
- Accounting > Configuration > Accounting Reports > Journal Report > Options >
Set `Load More Limit` to 1
- Accounting > Review > Journal Audit > Expand Sales
Traceback: `KeyError: 'no_format'`
Cause:
This error occurs when we expand the lines. During the expansion, we [append] a `Load more...` pagination row inside the report lines. In that row, we pass empty [dictionaries] in`columns`, like: `columns': [{}, {}, {}, {}, {}, {}]`. and we have offset. So, after expanding, there are two lines, and the second one is the Load more line.
Because its [columns] contain empty dictionaries, the `no_format` key is not found, which results in a `KeyError`.
Solution:
We are passing a `None` value if `no_format` is not present in the line's columns.
[append]: https://github.com/odoo/enterprise/blob/34c60542d87366d50484c21bc0576bdc59517c5e/account_reports/models/account_report.py#L5765
[dictionaries]: https://github.com/odoo/enterprise/blob/34c60542d87366d50484c21bc0576bdc59517c5e/account_reports/models/account_report.py#L5867-L5878
[columns]: https://github.com/odoo/enterprise/blob/34c60542d87366d50484c21bc0576bdc59517c5e/account_reports/models/account_journal_report.py#L158
opw-6125082This update fixes a limitation in how Odoo handles attachments uploaded through cron jobs. Previously, a specific setting prevented multiple attachments from being uploaded in a single job. Now, allowing `--limit-time-real=0` or `--limit-time-real-cron=0` enables the upload of multiple attachments, improving efficiency for automated processes.
Original PR description
make the `limit_time_real > 0` when --limit-time-real-cron=0 --limit-time-real=0 to allow multiple attachments to be uploaded in a single cron job. 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#264328
This update fixes a potential issue where users could accidentally assign multiple POS shops to a single cash payment method, leading to errors. Now, the system prevents this, ensuring data integrity and preventing disruptions to the point-of-sale process. This change improves the reliability of payment processing.
Original PR description
**Before this commit** The user will be able to assign two different POS shop to a cash payment method by going to POS -> Configuration -> Payment Methods -> Cash -> Point of sale, this will not raise a validation error when they try to save it but it will prevent the user from opening the POS session. **After this commit** It will raise a validation error if a user tries to assign more than one POS shop to one cash payment method and save it. opw-6015025 Forward-Port-Of: odoo/odoo#252603
This update fixes an issue where UBL invoices could incorrectly apply taxes due to differences in fiscal positions. The change ensures that only taxes matching the invoice's fiscal position are used during import, leading to more accurate tax calculations and reporting. This improves the reliability of financial data imported from UBL invoices.
Original PR description
When importing a UBL invoice, multiple taxes may share the same rate (e.g. 21%) but differ by fiscal position. Without filtering, the wrong tax (e.g. the domestic one for a foreign partner) could be selected. task-6138749 Forward-Port-Of: odoo/odoo#263872
This update resolves a bug that caused invoices with specific customer address configurations to fail during the cash rounding process. The fix ensures the correct partner information is used, preventing errors and allowing invoices to be properly processed. This improves invoice accuracy and reliability.
Original PR description
When applying a cash rounding with 'biggest tax' strategy, it happens that we end up with a MissingError when the invoice's partner is not defined as commercial_partner_id. Steps: - Install…
When applying a cash rounding with 'biggest tax' strategy, it happens that we end up with a MissingError when the invoice's partner is not defined as commercial_partner_id. Steps: - Install membership module - Create a cash rounding with the 'biggest tax' strategy and 0.05 rounding - Enable customer addresses and create a partner P with an invoice address I - Create an invoice, select I as customer (P will be assigned as delivery address but this is not relevant) - Add an invoice line for 100.03 and any tax and apply the cash rounding - Confirm -> MissingError: record has been deleted Cause: - When creating the cash rounding lines, we set the `partner_id` from the invoice's partner (in our case partner I, which has P as `commercial_partner_id`). - When posting the invoice we look for lines that have partner id different than the invoice's commercial partner id and we call the write method to set the commercial partner id instead https://github.com/odoo/odoo/blob/832165841f66675c0238652c5b0e5e0b6f75ca43/addons/account/models/account_move.py#L5234-L5239 - In some cases, for example in the `membership` module, the override of the write method calls the super() before using `self`. https://github.com/odoo/odoo/blob/832165841f66675c0238652c5b0e5e0b6f75ca43/addons/membership/models/account_move.py#L45-L49 But the super triggers the `_sync_tax_lines` mechanism, during which the rounding line in deleted https://github.com/odoo/odoo/blob/832165841f66675c0238652c5b0e5e0b6f75ca43/addons/account/models/account_tax.py#L3102-L3110 https://github.com/odoo/odoo/blob/832165841f66675c0238652c5b0e5e0b6f75ca43/addons/account/models/account_move.py#L3113-L3114 Therefore `self` doesn't exist anymore when comming back in the override Fix: Setting the commercial partner on the rounding line to avoid calling the write method opw-6128868 Forward-Port-Of: odoo/odoo#262759
This update resolves an issue where users could create a circular dependency when attaching files to records, leading to errors. The fix prevents an attachment from being linked to itself in both the user interface and the backend, ensuring data integrity and stability.
Original PR description
Currently, users have the option to attach an ir.attachment to itself. This causes a recursion depth error when accessing attachments. This commit prevents this in the UI and the write. Firstly, the ir.attachment does not show itself in the dropdown when selecting the resource ID. Second, the write raises a UserError if attempting to write an ir.attachment with the same ID as the Resource ID. Steps to reproduce: 1. Create an attachment and save 2. Set the Resource Model `(res.model)` to "ir.attachment" 3. Select the same attachment in Resource ID `(res_id)` 4. Attempt to view attachments: `RecursionError: maximum recursion depth exceeded` opw-6206075 closes #263591 Forward-Port-Of: odoo/odoo#264439 Forward-Port-Of: odoo/odoo#263591
A test within the l10n_latam_check module failed due to a dependency on the l10n_ar localization module not being installed. This update ensures that the test runs correctly by requiring the l10n_ar module to be present, preventing a runtime error.
Original PR description
Steps to reproduce: 1- Install l10n_latam_check on a fresh database instance 2- Run the test `test_invoice_status_after_voided_check` Issue: `ValueError: External ID not found in the system: l10n_ar.dc_liq_uci_a` Why this happens: The test used a document type from the l10n_ar module, so running the test without it being installed caused an error. runbot-243341 Forward-Port-Of: odoo/odoo#262800
This update resolves a technical issue impacting invoice accuracy for Mexican VAT (SAT) compliance. Previously, invoices with many items could trigger validation errors due to rounding discrepancies when applying per-line discounts. This fix ensures invoices pass SAT validation and correctly calculate discounts, improving financial reporting.
Original PR description
…any lines Fix SAT validation errors CFDI40111 and CFDI40108 that occur when invoices with many lines contain a small negative line, causing per-line discounts to be hidden due to currency precision. opw-6187014 Forward-Port-Of: odoo/enterprise#117344 Forward-Port-Of: odoo/enterprise#117297
This update fixes an issue where completion and refusal emails for signatures were incorrectly sent using the signer's partner email instead of the designated email defined within the sign request. Now, emails are sent using the correct, validated email address, ensuring signers receive important notifications reliably. This improves communication and reduces potential errors.
Original PR description
Previously, completion and refusal emails were sent using the partner email directly, ignoring the computed email defined on the sign request item. The computed email includes validation rules and should be the main email for signer communication. This commit ensures that completion and refusal emails are sent using the computed signer email instead of the partner email. task-6148765 Forward-Port-Of: odoo/enterprise#114606
5 changes
Resolved issues and error corrections
This update fixes an issue where discount lines in Czech VAT summary reports were incorrectly calculating values. The root cause was a conversion process that was incorrectly applying absolute values, leading to inflated report totals. The fix ensures accurate VAT reporting by only flipping the signs of negative balances, specifically for 'out_' accounts.
Original PR description
Step to reproduce: - install l10n_cz_reports_2025 and switch to cz company - create a invoice, with cz company ( as partner), of 100. - when adding products, add "Transaction code" (optional fields) to "Goods" - Add discount line, set to -10, add "Transaction code" in this line too. - confirm it Observation: - invoice is 90$ - open vies summary report for this year - value turn out to 110 Cause: - commit [1](https://github.com/odoo/enterprise/commit/892268c44b1bbc838a9f03ef36a079bfff625ca6) converts every balance to +ve and only negate it, in case of refund - in case of discount lines, price is -ve, ABS() turn it to +ve and value comes out to be wrong Fix: - instead of applying ABS() directly, we flip the signs only for out_* moves, in short when a account is credited, its balance is < 0 then we flip its sign opw- 5979262 Forward-Port-Of: odoo/enterprise#117038 Forward-Port-Of: odoo/enterprise#113087
This update corrects a CSV export issue for Danish EC Sales reports. The previous export incorrectly used 'LIST' instead of the required 'LISTE' format, leading to file rejection by tax authorities. This change ensures compliance with Danish regulations and prevents export failures.
Original PR description
### Issue: When exporting the Danish EC Sales List to CSV, the column name is `LIST` instead of `LISTE` According to the official documentation: https://info.skat.dk/data.aspx?oid=392&chk=217608 The correct value is `LISTE`, with a fixed length of 5 characters This cause rejection of the file This was already fixed in 19.0 when the two modules were merged: https://www.odoo.com/odoo/unassigned-tasks/4826286 ### Cause: The value `LIST` is hardcoded in the export https://github.com/odoo/enterprise/blob/b9e4fc1ba08db22dafd10f62a7d9159f963dc949/l10n_dk_reports/models/account_sales_report.py#L104-L107 ### Steps to reproduce: - Install `l10n_dk_reports` - Switch to DK Company - Go to EC Sales List - Download the CSV in the dropdown menu The column name should be LISTE opw-6127427 Forward-Port-Of: odoo/enterprise#116554
This update fixes a bug in the journal report that caused it to repeatedly load the same data when using the 'Load More' feature. The fix ensures that the report correctly handles pagination, displaying only the necessary data and improving performance for users. This change enhances the user experience and reduces loading times.
Original PR description
Steps to reproduce: - Install `Accounting` module - Accounting > Configuration > Accounting Reports > Journal Report > Options > Set `Load More Limit` to 1 - Accounting > Review > Journal Audit > Expand Sales > `Load more...` The "Load More" button in the journal report was repeatedly loading the same lines because the custom engine query was not applying the offset and limit parameters passed to the method. Solution: Applied pagination to the query by using the `_get_engine_query_tail` helper method from `account.report`, which correctly appends `OFFSET` and `LIMIT` clauses to the SQL query. opw-6193697, 6125082 Forward-Port-Of: odoo/enterprise#116367
This update optimizes PDF document generation by compressing files after merging, leading to significantly smaller file sizes. It also addresses a memory issue in the PDF processing, improving overall system performance, particularly with large documents. The change resulted in a 75% reduction in file size and a faster print time.
Original PR description
When merging pages with pypdf, the resulting content is uncompressed. A compression pass should be done right after to reduce the resulting file size. Additionally, this helps alleviate a memory leak in PyPDF2 where resources in the merged page are not properly released. Newer versions of pypdf (>=3.15.4) do not have this leak but still see benefits in the output file size. In practice the CPU overhead is negligible, and we actually see a speed increase in cases with high memory usage. Benchmark Printing 400 page annual report | |Print Time|Peak Memory|Output File| |------|----------|-----------|-----------| |Before|142s |3.6GB |103MB | |After |127s |0.4GB |5MB | opw-6148786 Forward-Port-Of: odoo/enterprise#117308 Forward-Port-Of: odoo/enterprise#115550
This update resolves a technical issue impacting invoice accuracy for Mexican VAT (SAT) compliance. Specifically, it corrects a rounding problem that caused discounts to be hidden on invoices with many items, leading to validation errors. This ensures invoices meet SAT requirements and avoid potential disruptions to financial reporting.
Original PR description
…any lines Fix SAT validation errors CFDI40111 and CFDI40108 that occur when invoices with many lines contain a small negative line, causing per-line discounts to be hidden due to currency precision. opw-6187014 Forward-Port-Of: odoo/enterprise#117344 Forward-Port-Of: odoo/enterprise#117297
14 changes
Resolved issues and error corrections
This update optimizes PDF report generation by compressing files after merging, reducing file sizes and improving performance. It also addresses a memory leak in the PDF processing, leading to faster report creation, especially with large documents. The change results in significantly smaller PDF files and faster print times.
Original PR description
When merging pages with pypdf, the resulting content is uncompressed. A compression pass should be done right after to reduce the resulting file size. Additionally, this helps alleviate a memory leak in PyPDF2 where resources in the merged page are not properly released. Newer versions of pypdf (>=3.15.4) do not have this leak but still see benefits in the output file size. In practice the CPU overhead is negligible, and we actually see a speed increase in cases with high memory usage. Benchmark Printing 400 page annual report | |Print Time|Peak Memory|Output File| |------|----------|-----------|-----------| |Before|142s |3.6GB |103MB | |After |127s |0.4GB |5MB | opw-6148786 Forward-Port-Of: odoo/odoo#264355 Forward-Port-Of: odoo/odoo#261879
This update optimizes PDF document generation by compressing files after merging, reducing their size significantly. It also addresses a memory issue in the PDF processing, leading to faster performance, especially with large documents. The result is smaller, more efficient PDF files.
Original PR description
When merging pages with pypdf, the resulting content is uncompressed. A compression pass should be done right after to reduce the resulting file size. Additionally, this helps alleviate a memory leak in PyPDF2 where resources in the merged page are not properly released. Newer versions of pypdf (>=3.15.4) do not have this leak but still see benefits in the output file size. In practice the CPU overhead is negligible, and we actually see a speed increase in cases with high memory usage. Benchmark Printing 400 page annual report | |Print Time|Peak Memory|Output File| |------|----------|-----------|-----------| |Before|142s |3.6GB |103MB | |After |127s |0.4GB |5MB | opw-6148786 Forward-Port-Of: odoo/enterprise#117254 Forward-Port-Of: odoo/enterprise#115550
This update fixes an issue where discount lines in Czech VAT reports were incorrectly calculating values. The previous method applied an absolute value function, leading to inflated report totals. The fix now correctly handles negative discount amounts, ensuring accurate VAT reporting.
Original PR description
Step to reproduce: - install l10n_cz_reports_2025 and switch to cz company - create a invoice, with cz company ( as partner), of 100. - when adding products, add "Transaction code" (optional fields) to "Goods" - Add discount line, set to -10, add "Transaction code" in this line too. - confirm it Observation: - invoice is 90$ - open vies summary report for this year - value turn out to 110 Cause: - commit [1](https://github.com/odoo/enterprise/commit/892268c44b1bbc838a9f03ef36a079bfff625ca6) converts every balance to +ve and only negate it, in case of refund - in case of discount lines, price is -ve, ABS() turn it to +ve and value comes out to be wrong Fix: - instead of applying ABS() directly, we flip the signs only for out_* moves, in short when a account is credited, its balance is < 0 then we flip its sign opw- 5979262 Forward-Port-Of: odoo/enterprise#117038 Forward-Port-Of: odoo/enterprise#113087
A recent test for point-of-sale receipt generation was failing due to an overly broad selector used to identify the shipping date. This update added a specific class to the shipping date element, ensuring the test accurately reflects how the receipt is generated across different localization settings. This resolves a potential issue with receipt accuracy.
Original PR description
Issue: ====== - The test used the selector `.pos-receipt-order-data div` to retrieve the shipping date. - This selector is not specific and matches different elements depending on localization. Fix: ==== - Add a specific class `shipping-date` to the shipping date element and update the test to use `.pos-receipt-order-data .shipping-date` to avoid incorrect matches. Task-6183114 Error-241995 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#262761
This update resolves an issue where the color picker wasn't available when editing website snippets with images containing shapes. The fix ensures that users can now customize the colors of these images directly within the website editor, improving design flexibility. This change impacts the website editing experience.
Original PR description
Steps to reproduce: 1. Go to the website and enter edit mode. 2. Drop `s_cta_mockups` or `s_closer_look` snippet. 3. Click on any image that has a shape. Issue: The color picker option is missing for images with shapes in these snippets. Reason: These snippet templates do not include the `shapeColors` dataset on the image elements. task-5880905 Forward-Port-Of: odoo/odoo#246249
The 'Load More' feature in the journal report was repeatedly loading the same data due to a technical issue. This update correctly implemented pagination, ensuring that the report only displays the necessary data based on the user's selection, improving performance and accuracy.
Original PR description
Steps to reproduce: - Install `Accounting` module - Accounting > Configuration > Accounting Reports > Journal Report > Options > Set `Load More Limit` to 1 - Accounting > Review > Journal Audit > Expand Sales > `Load more...` The "Load More" button in the journal report was repeatedly loading the same lines because the custom engine query was not applying the offset and limit parameters passed to the method. Solution: Applied pagination to the query by using the `_get_engine_query_tail` helper method from `account.report`, which correctly appends `OFFSET` and `LIMIT` clauses to the SQL query. opw-6193697, 6125082 Forward-Port-Of: odoo/enterprise#116367
This update fixes a limitation in how Odoo handles attachments uploaded through cron jobs. Previously, a single cron job could only upload one attachment at a time. Now, attachments can be uploaded in bulk, improving efficiency for automated processes. This change ensures smoother and faster uploads for scheduled tasks.
Original PR description
make the `limit_time_real > 0` when --limit-time-real-cron=0 --limit-time-real=0 to allow multiple attachments to be uploaded in a single cron job. 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#264328
This update fixes a potential crash during bank statement imports by ensuring the correct journal is selected. The system now validates currency and IBAN matches, automatically finding the appropriate journal if a mismatch exists. This prevents errors and improves the reliability of importing bank statements.
Original PR description
Behavior before: The import flow could crash with an "Expected singleton" error if multiple journals shared an IBAN. Additionally, the system blindly accepted the current context ('self') as the…
Behavior before:
The import flow could crash with an "Expected singleton" error if multiple
journals shared an IBAN. Additionally, the system blindly accepted the
current context ('self') as the target journal, even if its currency or
bank account mismatched the statement, often leading to avoidable
UserErrors.
Behavior after:
The system now validates 'self' against the statement's currency and IBAN
before assignment. If a mismatch is found, it automatically searches for
the correct journal. The search is now restricted by currency and includes
a limit=1 to prevent crashes and ensure accurate selection.
Root Cause:
In _find_additional_data(), 'journal = self' was assigned without validation.
Furthermore, the fallback search lacked a record limit and currency matching
logic, allowing multiple records to be returned when duplicates or
multi-currency setups existed.
Fix:
- Added validation for the initial 'self' candidate (currency and IBAN match).
- Refined the search domain to include currency matching (journal or
company fallback).
- Added limit=1 to the search to guarantee a singleton recordset.
opw-5462037
Forward-Port-Of: odoo/enterprise#116860
Forward-Port-Of: odoo/enterprise#115475This update resolves a technical issue causing malformed XML in the TestReports module. Previously, automatic cleanup handled this, but with newer software, the fix ensures accurate test reporting and prevents potential errors. This change improves the reliability of our testing processes.
Original PR description
This commit fixes a malformed HTML/XML tag in TestReports. Note: before libxml2 v2.14.0, this issue was automagically cleaned up, but not anymore. Note: backport of https://github.com/odoo/odoo/pull/258569 Forward-Port-Of: odoo/odoo#264330
This update addresses an issue where gift card balances automatically confirmed sales orders, bypassing the final checkout step. Now, Odoo will only confirm sales when a customer completes the standard checkout process, even with a fully covered cart. This ensures a more reliable and secure purchase experience.
Original PR description
**Before this commit** If a gift card balance fully covers a shopping cart containing multiple events, Odoo auto-confirms the order as soon as the last event is added, skipping the final checkout step. **After this commit** Sale orders will no longer be automatically confirmed when a customer registers for a paid event, even if an applied gift card brings the total balance to zero. opw-5896626 Forward-Port-Of: odoo/odoo#264233 Forward-Port-Of: odoo/odoo#246629
This change resolves a bug that caused invoices to fail when using the 'biggest tax' cash rounding strategy with customer addresses enabled. The fix ensures the correct partner ID is used during invoice processing, preventing data deletion and ensuring accurate calculations.
Original PR description
When applying a cash rounding with 'biggest tax' strategy, it happens that we end up with a MissingError when the invoice's partner is not defined as commercial_partner_id. Steps: - Install…
When applying a cash rounding with 'biggest tax' strategy, it happens that we end up with a MissingError when the invoice's partner is not defined as commercial_partner_id. Steps: - Install membership module - Create a cash rounding with the 'biggest tax' strategy and 0.05 rounding - Enable customer addresses and create a partner P with an invoice address I - Create an invoice, select I as customer (P will be assigned as delivery address but this is not relevant) - Add an invoice line for 100.03 and any tax and apply the cash rounding - Confirm -> MissingError: record has been deleted Cause: - When creating the cash rounding lines, we set the `partner_id` from the invoice's partner (in our case partner I, which has P as `commercial_partner_id`). - When posting the invoice we look for lines that have partner id different than the invoice's commercial partner id and we call the write method to set the commercial partner id instead https://github.com/odoo/odoo/blob/832165841f66675c0238652c5b0e5e0b6f75ca43/addons/account/models/account_move.py#L5234-L5239 - In some cases, for example in the `membership` module, the override of the write method calls the super() before using `self`. https://github.com/odoo/odoo/blob/832165841f66675c0238652c5b0e5e0b6f75ca43/addons/membership/models/account_move.py#L45-L49 But the super triggers the `_sync_tax_lines` mechanism, during which the rounding line in deleted https://github.com/odoo/odoo/blob/832165841f66675c0238652c5b0e5e0b6f75ca43/addons/account/models/account_tax.py#L3102-L3110 https://github.com/odoo/odoo/blob/832165841f66675c0238652c5b0e5e0b6f75ca43/addons/account/models/account_move.py#L3113-L3114 Therefore `self` doesn't exist anymore when comming back in the override Fix: Setting the commercial partner on the rounding line to avoid calling the write method opw-6128868 Forward-Port-Of: odoo/odoo#262759
This update resolves an issue where users could create attachments that pointed back to themselves, leading to errors. The fix prevents attachments from being linked to themselves in both the user interface and during data writing, ensuring data integrity and stability.
Original PR description
Currently, users have the option to attach an ir.attachment to itself. This causes a recursion depth error when accessing attachments. This commit prevents this in the UI and the write. Firstly, the ir.attachment does not show itself in the dropdown when selecting the resource ID. Second, the write raises a UserError if attempting to write an ir.attachment with the same ID as the Resource ID. Steps to reproduce: 1. Create an attachment and save 2. Set the Resource Model `(res.model)` to "ir.attachment" 3. Select the same attachment in Resource ID `(res_id)` 4. Attempt to view attachments: `RecursionError: maximum recursion depth exceeded` opw-6206075 closes #263591 Forward-Port-Of: odoo/odoo#264439 Forward-Port-Of: odoo/odoo#263591
This update adjusts how global discounts are exported to align with UBL (Universal Business Language) specifications. Previously, discounts were handled as negative invoice lines, which is now corrected to use 'allowances' for accurate UBL compliance. This ensures our accounting system meets international standards for electronic invoicing.
Original PR description
…ances Export global discounts as Allowances instead of negative invoice lines to comply with UBL specifications. task-5900496 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
This update resolves a technical issue impacting invoice accuracy for Mexican VAT (SAT) compliance. Specifically, it corrects rounding errors that occurred when invoices with many items had small negative line discounts, leading to validation failures. This ensures invoices meet SAT requirements and avoids potential payment processing problems.
Original PR description
…any lines Fix SAT validation errors CFDI40111 and CFDI40108 that occur when invoices with many lines contain a small negative line, causing per-line discounts to be hidden due to currency precision. opw-6187014 Forward-Port-Of: odoo/enterprise#117344 Forward-Port-Of: odoo/enterprise#117297
4 changes
Resolved issues and error corrections
This update resolves a technical issue impacting invoice accuracy for Mexican VAT (SAT) compliance. Specifically, it corrects rounding errors that occurred when invoices with many items had a small negative line, preventing per-line discounts from being correctly applied. This ensures invoices pass SAT validation and avoid potential financial discrepancies.
Original PR description
…any lines Fix SAT validation errors CFDI40111 and CFDI40108 that occur when invoices with many lines contain a small negative line, causing per-line discounts to be hidden due to currency precision. opw-6187014 Forward-Port-Of: odoo/enterprise#117297
This update corrects a CSV export issue for Danish VAT reporting. The previous version incorrectly used 'LIST' instead of the required 'LISTE' column name, leading to file rejection by the tax authorities. This change ensures compliance with Danish regulations and prevents export failures.
Original PR description
### Issue: When exporting the Danish EC Sales List to CSV, the column name is `LIST` instead of `LISTE` According to the official documentation: https://info.skat.dk/data.aspx?oid=392&chk=217608 The correct value is `LISTE`, with a fixed length of 5 characters This cause rejection of the file This was already fixed in 19.0 when the two modules were merged: https://www.odoo.com/odoo/unassigned-tasks/4826286 ### Cause: The value `LIST` is hardcoded in the export https://github.com/odoo/enterprise/blob/b9e4fc1ba08db22dafd10f62a7d9159f963dc949/l10n_dk_reports/models/account_sales_report.py#L104-L107 ### Steps to reproduce: - Install `l10n_dk_reports` - Switch to DK Company - Go to EC Sales List - Download the CSV in the dropdown menu The column name should be LISTE opw-6127427 Forward-Port-Of: odoo/enterprise#116554
The 'Load More' functionality in the journal report was repeatedly loading the same data due to a technical issue. This update correctly implements pagination, ensuring that only the necessary data is retrieved and displayed, improving report performance and accuracy. This resolves a bug impacting report loading times.
Original PR description
Steps to reproduce: - Install `Accounting` module - Accounting > Configuration > Accounting Reports > Journal Report > Options > Set `Load More Limit` to 1 - Accounting > Review > Journal Audit > Expand Sales > `Load more...` The "Load More" button in the journal report was repeatedly loading the same lines because the custom engine query was not applying the offset and limit parameters passed to the method. Solution: Applied pagination to the query by using the `_get_engine_query_tail` helper method from `account.report`, which correctly appends `OFFSET` and `LIMIT` clauses to the SQL query. opw-6193697, 6125082 Forward-Port-Of: odoo/enterprise#116367
This update fixes a potential crash during bank statement imports, specifically when multiple journals share an IBAN. The system now automatically validates currency and IBAN matches, ensuring the correct journal is selected and preventing errors. This improves the reliability and accuracy of the import process.
Original PR description
Behavior before: The import flow could crash with an "Expected singleton" error if multiple journals shared an IBAN. Additionally, the system blindly accepted the current context ('self') as the…
Behavior before:
The import flow could crash with an "Expected singleton" error if multiple
journals shared an IBAN. Additionally, the system blindly accepted the
current context ('self') as the target journal, even if its currency or
bank account mismatched the statement, often leading to avoidable
UserErrors.
Behavior after:
The system now validates 'self' against the statement's currency and IBAN
before assignment. If a mismatch is found, it automatically searches for
the correct journal. The search is now restricted by currency and includes
a limit=1 to prevent crashes and ensure accurate selection.
Root Cause:
In _find_additional_data(), 'journal = self' was assigned without validation.
Furthermore, the fallback search lacked a record limit and currency matching
logic, allowing multiple records to be returned when duplicates or
multi-currency setups existed.
Fix:
- Added validation for the initial 'self' candidate (currency and IBAN match).
- Refined the search domain to include currency matching (journal or
company fallback).
- Added limit=1 to the search to guarantee a singleton recordset.
opw-5462037
Forward-Port-Of: odoo/enterprise#116860
Forward-Port-Of: odoo/enterprise#1154757 changes
Resolved issues and error corrections
This update resolves an error that occurred when users set their fiscal year's end date to February 29th. The fix ensures reports accurately calculate dates, regardless of whether the fiscal year is a leap year or not. This prevents reporting issues related to incorrect date calculations.
Original PR description
**Steps to Reproduce:** 1. Install the Accounting module. 2. Go to Settings and set the fiscal year's last day to 29 February. 3. Accounting > Reporting > open any report. **Error:** `ValueError - day is out of range for month` **Cause:** At [1], a fixed year (2025) is used to compute the fiscal year end. However, 2025 is not a leap year, so creating a date with February 29 raises an error. **Fix:** Ensure that when the fiscal year’s last day is Feb 29, a leap year (2024) is used for the computation. For all other dates, the year remains unchanged (2025). As a result; - If the last day is February **28** (non-leap year) -> `fy_start` becomes **March 1** - If the last day is February **29** (leap year) -> `fy_start` also becomes **March 1** [1] - https://github.com/odoo/enterprise/blob/4fa1c0c13308bd8de06646543391f8cbcf28d05e/account_reports/models/account_report.py#L820 sentry-7438598965 Forward-Port-Of: odoo/enterprise#115400
This update prevents a critical error that occurred when creating quality checks from quality points. The issue arose when a product wasn't specified, causing a system error. This fix ensures quality checks can be created successfully under all circumstances, improving data integrity and usability.
Original PR description
When creating a quality check from a quality point, a traceback occurs if no product is set. Steps to reproduce the error: - Install ``quality_control`` module with demo data - Go to Quality > Quality Control > Control Points > Create a new Control point > Set Control per: Quantity, Partial Test: 99 > Save - Click on Quality Checks smart button > Click on New Traceback: ```py ValueError: Expected singleton: uom.uom() ``` https://github.com/odoo/enterprise/blob/4fa1c0c13308bd8de06646543391f8cbcf28d05e/quality_control/models/quality.py#L369 During creation of a quality check, ``product_id`` is not set. The compute method ``_compute_qty_to_test`` accesses ``product_id.uom_id``, which leads to the above traceback. sentry-7440188763 Forward-Port-Of: odoo/enterprise#115292
This update resolves a technical issue preventing v19.1 upgrades of subscription orders. The problem stemmed from a comparison between a boolean value and a date field during invoice calculation, causing an error. This fix ensures correct invoice generation for subscription orders.
Original PR description
**Steps-to-Reproduce** - In v19, install subscriptions. - create new subscription + service product with allow one time sale enabled. - make a SO with that product,any reccuring plan and any end…
**Steps-to-Reproduce**
- In v19, install subscriptions.
- create new subscription + service product with allow one time sale enabled.
- make a SO with that product,any reccuring plan and any end date.
```
id | name | subscription_state | next_invoice_date | end_date
----+--------+--------------------+-------------------+------------
1 | S00001 | 1_draft | | 2026-05-02
```
- confirm the SO
```
id | name | subscription_state | next_invoice_date | end_date
----+--------+--------------------+-------------------+------------
1 | S00001 | 3_progress | 2026-05-01 | 2026-05-02
```
- remove its recurring plan (some product sold for months for testing then converted to one time sale )
```
id | name | subscription_state | next_invoice_date | end_date
----+--------+--------------------+-------------------+------------
1 | S00001 | 3_progress | | 2026-05-02
```
- upgrade to v19.1 will fail or opening sales > To Invoice > Orders To Invoice gives this error or add amount_to_invoice in list view using studio to produce in v19 :
```
File "/home/odoo/odoo18/enterprise/sale_subscription/models/sale_order_line.py",
line 175, in _compute_amount_to_invoice
and (not order.end_date or order.next_invoice_date < order.end_date)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
TypeError: '<' not supported between instances of 'bool' and 'datetime.date'
```
- upgrade failing for v19.1 because amount_to_invoice added to list view [here](https://github.com/odoo/odoo/commit/427232efd121410380b62acf4fd2e9ee369e6542#diff-48cb4309a6006f91b2b40e4c1049860218d419fce1782c7dcc278329803129caR193-R213).
upg - [4220658](https://upgrade.odoo.com/odoo/upgrade.request/4220658)
opw - [6128033](https://www.odoo.com/odoo/project/70/tasks/6128033)
Forward-Port-Of: odoo/enterprise#116477
Forward-Port-Of: odoo/enterprise#115976This update fixes an issue where discount lines in Czech VAT reports were incorrectly calculating values. The previous method used absolute values, leading to inflated report totals. The fix now correctly handles negative discount amounts, ensuring accurate reporting of VAT liabilities. This ensures compliance with Czech regulations.
Original PR description
Step to reproduce: - install l10n_cz_reports_2025 and switch to cz company - create a invoice, with cz company ( as partner), of 100. - when adding products, add "Transaction code" (optional fields) to "Goods" - Add discount line, set to -10, add "Transaction code" in this line too. - confirm it Observation: - invoice is 90$ - open vies summary report for this year - value turn out to 110 Cause: - commit [1](https://github.com/odoo/enterprise/commit/892268c44b1bbc838a9f03ef36a079bfff625ca6) converts every balance to +ve and only negate it, in case of refund - in case of discount lines, price is -ve, ABS() turn it to +ve and value comes out to be wrong Fix: - instead of applying ABS() directly, we flip the signs only for out_* moves, in short when a account is credited, its balance is < 0 then we flip its sign opw- 5979262 Forward-Port-Of: odoo/enterprise#117038 Forward-Port-Of: odoo/enterprise#113087
This update corrects errors in the Norwegian VAT XML export that were preventing successful validation by the Skatteetaten tax authority. The changes ensure the XML adheres to strict government rules regarding decimal formatting, rounding, and required legal notes, allowing VAT returns to be submitted correctly.
Original PR description
Before commit: The Norwegian VAT XML export fails Skatteetaten validation due to incorrect decimal formatting, mathematical rounding mismatches between base and tax amounts, missing mandatory legal…
Before commit: The Norwegian VAT XML export fails Skatteetaten validation due to incorrect decimal formatting, mathematical rounding mismatches between base and tax amounts, missing mandatory legal notes, and invalid KID number formats. Fix: To strictly follow Skatteetaten validation rules for the Norway VAT XML, the following changes were implemented: - Ensured standard rates drop the decimal (e.g, `25.0` to `25`), and formatted fractional rates like `11.11` to `11,11` in XML. - Rounded down the `tax_amount` to align precisely with government mathematical expectations. - `base_amount` converted into absolute value to ensuring the calculation (`base * rate = tax`) resolves perfectly. - Add the mandatory `<merknad>` explaining the reverse charge method for codes 81, 83, 86, 88, and 91. - Clean the `company_kid` by safely stripping the 'NO' prefix, and 'MVA' suffix. Expect: The generated XML payload now adheres perfectly to Skatteetaten's strict structural and mathematical rules, allowing the VAT return to pass government validations successfully. Related Community PR: https://github.com/odoo/odoo/pull/258390 Task-6033027 Forward-Port-Of: odoo/enterprise#117168 Forward-Port-Of: odoo/enterprise#110792
This update cleans up tests related to the recent restructuring of the POS stock functionality. Previously, tests were referencing outdated stock-related data, which has now been removed to align with the new `pos_stock` module. This ensures the tests accurately reflect the current system.
Original PR description
Issue: ====== - Some tests were still using stock-related fields and groups that were previously part of `pos`, but were moved to a new module `pos_stock` after the refactor. Fix: ===== - Remove references to these fields from the tests, as stock-related logic is now handled in `pos_stock` module. Task-6183114 Error-242928,243017,243059 Related Community PR: https://github.com/odoo/odoo/pull/262719 Forward-Port-Of: odoo/enterprise#116185
The 'Waiting for Me' filter in the Sign app was incorrectly fetching all documents instead of filtering those requiring the current user's signature. This update corrects a technical issue related to how the system processes filter criteria, ensuring the filter functions as intended and only displays relevant documents.
Original PR description
When applying the 'Waiting for me' filter in the Sign app, all documents are fetched instead of filtering out documents that do not need the current user's signature. Steps to reproduce: 1) Install…
When applying the 'Waiting for me' filter in the Sign app, all documents are fetched instead of filtering out documents that do not need the current user's signature.
Steps to reproduce:
1) Install sign with demo data
2) Open sign app and remove default filter
3) Add a filter Waiting for me
Observed Behavior:
All the documents are fetched.
Expected Behavior:
Documents should be filtered out to only show those where the current user is a signer.
Root Cause:
Since [commit](https://github.com/odoo/enterprise/pull/76079/changes/8b5048f63f91a38a710b611d17f5cf27fbd0a18a), The `_search_need_my_signature` method returned `NotImplemented` for any operator other than `in` at [1]. While the filter uses `=` at [2]. Following a recent ORM optimization with the mentioned commit, the operators are now standardized as shown
From:
`('need_my_signature', '=', True)]`
To:
`[('need_my_signature', 'in', [True])]`
This means the search method now receives the expected `in` operator. However, the return logic uses a `not in` condition when filtering documents waiting for signature.
As a result, instead of filtering documents, all documents are returned.
[1]- https://github.com/odoo/enterprise/blob/012b42c20b48e8e36298875e3291936e68e72375/sign/models/sign_request.py#L107-L108
[2]- https://github.com/odoo/enterprise/blob/012b42c20b48e8e36298875e3291936e68e72375/sign/views/sign_request_views.xml#L177
Fix:
Corrected the return domain logic to fetch the correct documents.
opw-6026935
Forward-Port-Of: odoo/enterprise#117049
Forward-Port-Of: odoo/enterprise#1137607 changes
Enhancements to existing features
This update ensures the AI-powered page creation button is consistently visible throughout the Odoo website. Previously, the button was missing from key areas like the 404 page and menu editor, hindering user adoption of the new AI assistance feature. This change improves the user experience and simplifies page creation.
Original PR description
Initially, when the AI feature for helping users create their own pages was merged, there were a few areas where the “AI” button was not added. This commit adds the missing “AI” button to: - On 404 page, beside the “Create Page” button in the banner. - In menu editor, beside the “Create Page” button. task-5136652
Resolved issues and error corrections
This update resolves an issue that prevented invoices with combo products lacking taxes from being processed correctly when generating Peru UBL invoices. The fix ensures that these invoices are now processed without errors, improving the reliability of invoice generation for Peru-based businesses. This was triggered by a validation rule that was incorrectly excluding combo products.
Original PR description
A traceback occurs when sending an invoice to Peru UBL if a combo product invoice line does not have any taxes applied. Steps to reproduce the error: - Install ``l10n_pe_edi`` module with demo data -…
A traceback occurs when sending an invoice to Peru UBL if a combo product invoice line does not have any taxes applied. Steps to reproduce the error: - Install ``l10n_pe_edi`` module with demo data - Switch to PE Company - Create an invoice > Add a Office Combo product > unset the taxes > Confirm - Process now https://github.com/odoo/enterprise/blob/d7f71a68fbd5ff9c7cd52f96e1616671a6b8d77c/l10n_pe_edi/models/account_edi_xml_ubl_pe.py#L549-L552 Here, the ``grouping_key`` becomes ``None`` when no taxes are present on the invoice line. Normally, invoices without taxes are restricted at [1], but combo products are excluded from this validation at [2]. As a result, combo product lines without taxes bypass the restriction and trigger a traceback. [1]: https://github.com/odoo/enterprise/blob/d7f71a68fbd5ff9c7cd52f96e1616671a6b8d77c/l10n_pe_edi/models/account_edi_format.py#L928-L929 [2]: https://github.com/odoo/odoo/blob/42b8852df9b323984364c41a13cf27d19fbe04a7/addons/account/models/account_move_line.py#L3433-L3434 sentry-7430552834 Forward-Port-Of: odoo/enterprise#114798
This update resolves an issue where users with limited planning permissions couldn't copy planning slots to employees with flexible calendars. Now, users with planning manager rights can successfully copy slots, even when moving them to flexible resource calendars, without encountering access errors. This simplifies the planning process for users with restricted access.
Original PR description
**Purpose**: A user with planning manager rights but no access to employee and contract records should be able to copy and movea planning slot to an employee with a flexible resource_calendar without…
**Purpose**: A user with planning manager rights but no access to employee and contract records should be able to copy and movea planning slot to an employee with a flexible resource_calendar without getting an access rights error. **Before this commit:** When copying a planning slot, the system tries to compute the working hours over the period of the slot. This will raise an access rights error if the user doesn't have access to employee and contract records when the slot is moved to a flexible resource_calendar. **After this commit:** The user can copy a planning slot without access rights error with only planning manager rights, even if the slot is moved to a flexible resource_calendar. **Steps to reproduce:** 1.Install Planning and Planning Contract modules. 2.Create a user with only planning manager rights and no access to employee and contract records. 3.Copy a planning slot to an employee with a flexible resource_calendar. opw-6166557 Forward-Port-Of: odoo/enterprise#117180 Forward-Port-Of: odoo/enterprise#115953
This update fixes an issue where the VIES summary report was incorrectly displaying invoice values due to how discounts were being calculated. The fix ensures that discount lines are accurately reflected in the report, preventing discrepancies in financial reporting. This improves the accuracy of VAT reporting for Czech companies.
Original PR description
Step to reproduce: - install l10n_cz_reports_2025 and switch to cz company - create a invoice, with cz company ( as partner), of 100. - when adding products, add "Transaction code" (optional fields) to "Goods" - Add discount line, set to -10, add "Transaction code" in this line too. - confirm it Observation: - invoice is 90$ - open vies summary report for this year - value turn out to 110 Cause: - commit [1](https://github.com/odoo/enterprise/commit/892268c44b1bbc838a9f03ef36a079bfff625ca6) converts every balance to +ve and only negate it, in case of refund - in case of discount lines, price is -ve, ABS() turn it to +ve and value comes out to be wrong Fix: - instead of applying ABS() directly, we flip the signs only for out_* moves, in short when a account is credited, its balance is < 0 then we flip its sign opw- 5979262 Forward-Port-Of: odoo/enterprise#117038 Forward-Port-Of: odoo/enterprise#113087
This update fixes a bug in the journal report that caused it to repeatedly load the same data when using the 'Load More' feature. The fix ensures that the report correctly handles pagination, displaying only the necessary amount of data and improving performance for users.
Original PR description
Steps to reproduce: - Install `Accounting` module - Accounting > Configuration > Accounting Reports > Journal Report > Options > Set `Load More Limit` to 1 - Accounting > Review > Journal Audit > Expand Sales > `Load more...` The "Load More" button in the journal report was repeatedly loading the same lines because the custom engine query was not applying the offset and limit parameters passed to the method. Solution: Applied pagination to the query by using the `_get_engine_query_tail` helper method from `account.report`, which correctly appends `OFFSET` and `LIMIT` clauses to the SQL query. opw-6193697, 6125082 Forward-Port-Of: odoo/enterprise#116367
This update corrects a problem that caused invoices with many items to fail SAT validation (CFDI40111 and CFDI40108). The issue stemmed from currency precision calculations when applying discounts, particularly with small negative line amounts. This ensures invoices meet Mexican tax regulations and avoid errors.
Original PR description
…any lines Fix SAT validation errors CFDI40111 and CFDI40108 that occur when invoices with many lines contain a small negative line, causing per-line discounts to be hidden due to currency precision. opw-6187014 Forward-Port-Of: odoo/enterprise#117344 Forward-Port-Of: odoo/enterprise#117297
This update optimizes PDF generation by compressing files after merging, reducing their size and improving performance. It also addresses a memory leak issue in the PDF processing library, leading to faster processing, especially with large documents. The result is smaller, faster PDF exports.
Original PR description
When merging pages with pypdf, the resulting content is uncompressed. A compression pass should be done right after to reduce the resulting file size. Additionally, this helps alleviate a memory leak in PyPDF2 where resources in the merged page are not properly released. Newer versions of pypdf (>=3.15.4) do not have this leak but still see benefits in the output file size. In practice the CPU overhead is negligible, and we actually see a speed increase in cases with high memory usage. Benchmark Printing 400 page annual report | |Print Time|Peak Memory|Output File| |------|----------|-----------|-----------| |Before|142s |3.6GB |103MB | |After |127s |0.4GB |5MB | opw-6148786 Forward-Port-Of: odoo/enterprise#117308 Forward-Port-Of: odoo/enterprise#115550
3 changes
Resolved issues and error corrections
This update fixes a potential crash during bank statement imports by ensuring the correct journal is selected. The system now validates currency and IBAN matches, automatically finding the appropriate journal if discrepancies exist. This prevents errors and improves the reliability of the import process.
Original PR description
Behavior before: The import flow could crash with an "Expected singleton" error if multiple journals shared an IBAN. Additionally, the system blindly accepted the current context ('self') as the…
Behavior before:
The import flow could crash with an "Expected singleton" error if multiple
journals shared an IBAN. Additionally, the system blindly accepted the
current context ('self') as the target journal, even if its currency or
bank account mismatched the statement, often leading to avoidable
UserErrors.
Behavior after:
The system now validates 'self' against the statement's currency and IBAN
before assignment. If a mismatch is found, it automatically searches for
the correct journal. The search is now restricted by currency and includes
a limit=1 to prevent crashes and ensure accurate selection.
Root Cause:
In _find_additional_data(), 'journal = self' was assigned without validation.
Furthermore, the fallback search lacked a record limit and currency matching
logic, allowing multiple records to be returned when duplicates or
multi-currency setups existed.
Fix:
- Added validation for the initial 'self' candidate (currency and IBAN match).
- Refined the search domain to include currency matching (journal or
company fallback).
- Added limit=1 to the search to guarantee a singleton recordset.
opw-5462037
Forward-Port-Of: odoo/enterprise#115475This update corrects a technical issue preventing Danish EC Sales reports from exporting correctly to CSV. The column name was incorrectly set to 'LIST' instead of the required 'LISTE', causing file rejection by tax authorities. This change aligns with official documentation and ensures compliance.
Original PR description
### Issue: When exporting the Danish EC Sales List to CSV, the column name is `LIST` instead of `LISTE` According to the official documentation: https://info.skat.dk/data.aspx?oid=392&chk=217608 The correct value is `LISTE`, with a fixed length of 5 characters This cause rejection of the file This was already fixed in 19.0 when the two modules were merged: https://www.odoo.com/odoo/unassigned-tasks/4826286 ### Cause: The value `LIST` is hardcoded in the export https://github.com/odoo/enterprise/blob/b9e4fc1ba08db22dafd10f62a7d9159f963dc949/l10n_dk_reports/models/account_sales_report.py#L104-L107 ### Steps to reproduce: - Install `l10n_dk_reports` - Switch to DK Company - Go to EC Sales List - Download the CSV in the dropdown menu The column name should be LISTE opw-6127427 Forward-Port-Of: odoo/enterprise#116554
This update resolves a critical issue with Mexican electronic invoices (CFDI) caused by how discounts are handled when multiple product lines are present. The fix ensures accurate SAT validation by correctly reconciling document-level discount and subtotal totals with individual line values, preventing invoice rejection.
Original PR description
## Summary Fix SAT validation errors **CFDI40111** and **CFDI40108** that occur when invoices with many lines contain a small negative line, causing per-line discounts to be hidden due to currency…
## Summary Fix SAT validation errors **CFDI40111** and **CFDI40108** that occur when invoices with many lines contain a small negative line, causing per-line discounts to be hidden due to currency precision. ## Real Case Example Invoice has **48 positive product lines** and **1 negative line** (subtotal **-0.99**). CFDI does not allow negative concept lines, so Odoo distributes the `-0.99` as tiny discounts across all 48 lines. ### The Problem For each line, the discount is computed and rounded to 6 decimal places. When spread across 48 lines, each discount is roughly **0.02**. With MXN currency precision (2 decimals), many are below `0.01` and are **hidden** from the XML during cleanup. This causes two mismatches: 1. **CFDI40111** — `Descuento` mismatch: - Document-level `Descuento` is computed **before** cleanup: **0.99** - Sum of visible line `Descuento` after cleanup: only ~23 lines remain visible, summing to roughly **0.96** - SAT rejects because `0.99 ≠ 0.96` 2. **CFDI40108** — `SubTotal` mismatch: - Fixing the first error by adding the delta to the line's `Importe` also changes the document `SubTotal`, breaking the rule `SubTotal = Σ Importe` - SAT rejects because the rounded `SubTotal` no longer matches the sum of visible line `Importe` values ## Solution After the cleanup phase in `_add_base_lines_cfdi_values`, we independently reconcile both SAT requirements: 1. **SubTotal = Σ Importe** (CFDI40108): - Compute `delta = visible_importes - document_subtotal` - Add `delta` to the **largest line** by `Importe` - Update `SubTotal` and recalculate `ValorUnitario` 2. **Descuento = Σ Descuento** (CFDI40111): - Compute `delta = visible_descuento - document_descuento` - Add `delta` to the **largest line** by `Descuento` This ensures both SAT rules are satisfied simultaneously. ## Testing A unit test `test_invoice_negative_lines_many_lines` reproduces the exact scenario: - Creates an invoice with **10 positive lines** and **1 negative line (-0.99)** - Generates the CFDI - Asserts that `Descuento` total equals the sum of visible line `Descuento` values - Asserts that `SubTotal` equals the sum of visible line `Importe` values All existing rounding and negative-line tests pass (`0 failed, 0 errors`). Ticket: https://www.odoo.com/es_ES/my/tasks/6187014 @moduon MT-14784