Daily updates from Odoo
Friday, July 24, 2026
87 changes
12 changes
New functionality added to Odoo
Spreadsheet users can now display the readable name of a selected global filter, such as a customer name, instead of only its internal ID. This makes spreadsheet reports easier to understand and share with business users.
Original PR description
Before this commit: If you use ODOO.FILTER.VALUE and have a customer set in the global filter, it returns the id of the customer. That can be useful in some cases but in others you might simply want the label. Task: 6167605 Forward-Port-Of: odoo/enterprise#124746 Forward-Port-Of: odoo/enterprise#115984
Enhancements to existing features
When users choose a project in the timesheet timer, Odoo now automatically fills in the task they most recently logged time on for that project. Helpdesk projects get the same convenience for tickets, helping users start timers faster while still allowing them to choose a different item in one click.
Original PR description
When selecting a project in the timesheet timer, the task on which the user most recently logged time for that project is now prefilled, as they are most likely to keep logging time on it. If not, selecting a different task only requires one click. For Helpdesk projects, where the timer shows the ticket field instead of the task field, the most recently timesheeted ticket is prefilled in the same way. task-6359030 Forward-Port-Of: odoo/enterprise#124010
The employee time-off Gantt view now loads availability information in grouped batches and only for the requested date range. This makes large employee schedules much faster to open, reducing wait times from several seconds to around one second in the reported case.
Original PR description
At odoo, our friendly kitchen chef needs to know who is off on any given day. To know that, they use the holiday gantt view and display all employees and check the sum. For 200+ employees working at GR2, `get_gantt_data` takes 7+ seconds `_unavailable_intervals_batch` is called for each individual version, which means it's not batched. Ultimatly, it leads to lots of sql queries that could be grouped together. With this commit, the calls are batched per calendar before: ~7s after: ~900ms-1s Forward-Port-Of: odoo/enterprise#125385 Forward-Port-Of: odoo/enterprise#124820
Resolved issues and error corrections
Fixed an issue that could make bank statement CSV imports fail when the system performed a trial import before saving. This helps users import bank statement lines more reliably and avoids confusing “record deleted” errors.
Original PR description
odoo/odoo#255059 made execute_import's savepoint flushing, so a dryrun rollback now properly invalidates the ORM cache instead of leaving it. That exposed a pre-existing bug here: we created the statement with line_ids pointing at .line records dryrun had already rolled back, raising "Record does not exist or has been deleted". To fix this issue we run as dryrun as False to allow the execute_import's savepoint do the work and rollbacked in finally. Steps to reproduce: - Just import a account.bank.statement.line OPW-6410352
Product managers can now automatically fill product details from barcode lookups without needing full system administrator access. This lets authorized product teams create and maintain products more efficiently while avoiding unnecessary admin permissions.
Original PR description
Currently when a user with a product manager rights that is not admin tries to look up the product with barcode information is not auto filled. ## Steps to replicate: - Install stock with demo data -…
Currently when a user with a product manager rights that is not admin tries to look up the product with barcode information is not auto filled. ## Steps to replicate: - Install stock with demo data - Barcode Database > Setup barcode lookup credentials - Users > Marc Demo > Give Marc Demo > Master Data > Products > Create - Login as `Marc Demo` - Products > Barcode: `850049670180` > Click anywhere else ## Observed Behaviour: Information on the product template is not autofilled, as it would be when using a System Admin user(Mitchell Admin). ## Root cause: This issue occurs because barcode lookup is gated behind a check for System Admin rights. Although users in the Product Manager group have permission to create products, they do not satisfy this condition, so the barcode lookup never executes at [1]. [1]- https://github.com/odoo/enterprise/blob/c66995fda83e19b28a38312af8efdc1601881cf0/product_barcodelookup/models/product_template.py#L17-L22 ## Why this is an issue: The original restriction (task [2] and commit [3]) was intended to limit barcode lookup to users who can create products, preventing unnecessary API calls. This was a valid assumption in 17.3-18.0, where creating products in POS required System Admin rights but now after commit [4] this is no longer the case. In v18, task [5] introduced the Product Manager group, making product creation independent of System Admin rights or module rights. Later, v18.3 exposed these Master Data access rights to non-debug users through commit [6]. As a result, there are users who are legitimately responsible for product creation and maintenance (regardless of POS usage) they can no longer use barcode lookup unless they are also granted full System Admin privileges, which provides broader access than required. ## Solution: Remove the group-based permission check so that access is determined solely by product edit permissions. This ensures that only users with the ability to modify products can use the API call, preserving the original security intent. As a result, users no longer need unnecessary administrative privileges toperform barcode lookups. [2]: https://www.odoo.com/odoo/project/49/tasks/3911024 [3]: https://github.com/odoo/enterprise/commit/444df3e48cb8d479d3b5d4a03a4bfefa48650910 [4]: https://github.com/odoo/odoo/commit/821bbc4504fd80a508e2412c7490ee60dd03f7b8 [5]: https://github.com/odoo/odoo/commit/d4886faf12ccaf63d5e899c20df2543d1ce046ab [6]: https://github.com/odoo/odoo/commit/e74eaf628498155243db73ea229eaf5e74c24f2a opw-6290999 Forward-Port-Of: odoo/enterprise#121915
Fixed an issue where Chilean electronic delivery guides could fail when printing deliveries for kits whose components use different units of measure. The guide now prices component lines from the product when needed, avoiding invalid unit conversions and helping users complete deliveries without errors.
Original PR description
When a kit is delivered, each component move is linked to the kit's sale order line. Pricing the delivery guide in "sale order" mode converted the component quantity into the kit's sale UoM. For a component sold in a different UoM category than the kit, this cross-category conversion raises a UserError. Steps to reproduce: - Create a BoM for a kit product with a component in a different UoM category - Create a customer with Delivery Guide Price = "From Sale Order" - Sold the kit in a sale order and deliver it - On the delivery, print the delivery guide -> error This fix makes the guide price for a component move to be "product" if the component's product is different from the related sale line product, avoiding the cross-category UoM conversion. opw-6327895 Forward-Port-Of: odoo/enterprise#125199 Forward-Port-Of: odoo/enterprise#122776
Fixed an issue where importing a Chilean electronic invoice file containing multiple documents could put all invoice lines and references onto the first vendor bill. Each bill now only uses its own document data, helping prevent incorrect totals and reconciliation problems.
Original PR description
When importing an EnvioDTE XML containing several DTEs (journal upload or incoming DTE mail server), one vendor bill is created per DTE, but the first bill receives the invoice lines and references…
When importing an EnvioDTE XML containing several DTEs (journal upload or incoming DTE mail server), one vendor bill is created per DTE, but the first bill receives the invoice lines and references of ALL the DTEs in the file, causing the total amount mismatch.
Cause: `_split_xml_into_new_attachments()` creates new attachments for the documents beyond the first one but leaves the original `file_data['xml_tree']` untouched; the decoder must scope itself to the first document (as l10n_it_edi and l10n_es_edi_facturae do), which `_l10n_cl_import_dte()` never did.
e.g. l10n_es_edi_facturae:633:
```python
# Only decode the first invoice of the Factura-e file.
tree = tree.xpath('//Invoice')[0]
```
Fix: scope the tree to the first DTE node before filling the bill. Kept behind a `len > 1` guard so files with a bare <DTE> root (matched by `xpath('//ns0:DTE')` but not by `findall('.//ns0:DTE')`) keep working.
Introduced in: https://github.com/odoo/enterprise/pull/75327.
opw-6378954
Forward-Port-Of: odoo/enterprise#124691Testing a CSV bank statement import no longer tries to create a temporary bank statement that can disappear during the test rollback. This prevents a misleading missing-record error when the import data is valid, making the import preview more reliable for accounting users.
Original PR description
Problem: When testing importing a bank statement, an error gets thrown although the import is correct. Steps: 1. Go to Accounting 2. Go to Bank -> Import 3. Download the Import Template 4. Try…
Problem: When testing importing a bank statement, an error gets thrown although the import is correct. Steps: 1. Go to Accounting 2. Go to Bank -> Import 3. Download the Import Template 4. Try importing the template 5. Select to Create New Values in case of absent values 6. Test the import 7. Notice the error "Record *** does not exist ..." Cause: When testing an import of bank statement, the importing of the bank statement lines is done first and then they are linked to a new bank statement, if needed. https://github.com/odoo/enterprise/blob/831cc0201b128d82ce08a3f97b207859d8904870/account_bank_statement_import_csv/wizard/account_bank_statement_import_csv.py#L140-L145 This gets rolled back in case of testing (dryrun) https://github.com/odoo/enterprise/blob/831cc0201b128d82ce08a3f97b207859d8904870/account_bank_statement_import_csv/wizard/account_bank_statement_import_csv.py#L152 However, because the importing of the bank statement lines is a full test import of its own: https://github.com/odoo/enterprise/blob/831cc0201b128d82ce08a3f97b207859d8904870/account_bank_statement_import_csv/wizard/account_bank_statement_import_csv.py#L140 it gets rolled back before the lines can be linked to a new bank statement, resulting in the error of missing records. This didn't happen before because the BaseImport would not flush the cache when rolling back the changes, so the statement lines would still be in the cache and then can get linked to the statement. But after this commit: odoo/odoo@06889bd , where the savepoint in the BaseImport changed to a flushing savepoint: https://github.com/odoo/odoo/commit/06889bd62465fa20c79084b3027e0e917a55a8c8#diff-f7ea8dfd301f732f65b95439f68b7d124dd274fb2130a2aba037c9c17ceb963fL1441-R1439 when the importing of bank statement lines gets rolled back, the lines get flushed from the cache and cannot be linked to the newly created bank statement. Solution: There's no need to test linking the imported lines to a newly created bank statement. We can skip creating the bank statement if it is a test import (dryrun). opw-6404000
Applying an Engineering Change Order with attached documents could fail because the system saved the wrong document reference. This fix ensures the correct attachment is linked, allowing changes with documents to be applied reliably.
Original PR description
When applying an ECO, `action_apply` copies each ECO document onto the product template and fills `origin_attachment_id` with `attach.id`. That field is a many2one to `ir.attachment`, but `attach` is a `product.document`. Steps to reproduce: - Create an `mrp.eco` record and start a new revision - Upload a document on the ECO, note its product.document id - Make sure no ir.attachment exists with that same id - Move the ECO to its final stage and hit "Apply Changes" - Observe the error The very same change was already applied on master by 3a39186f883, but was never backported. opw-6387343 Forward-Port-Of: odoo/enterprise#124950
AI-assisted create and update actions now recover gracefully when entered values break database rules, allowing the assistant to retry instead of failing outright. The update also improves access to needed model information so AI workflows can create related records more reliably for internal users.
Original PR description
Prior to this commit, the create and update tool calls could cause an unrecoverable error if the model tried to use values which were causing an SQL constraint to fail. With this commit, we add a try..except block with a savepoint to treat the SQL constraint errors as regular errors, ensuring that the model is able to retry if it misses a check. task-6196137 Forward-Port-Of: odoo/enterprise#121607
Employees can now have their analytic distribution updated without triggering a save error. The change removes unsupported tracking from this payroll accounting field, preventing errors while keeping the field available for employee records.
Original PR description
Problem: Users cannot change analytic distribution set on employees. Users encounter an error when trying to change it. Steps to reproduce: 1. Enable analytic accounting 2. Try to edit the analytic…
Problem: Users cannot change analytic distribution set on employees. Users encounter an error when trying to change it. Steps to reproduce: 1. Enable analytic accounting 2. Try to edit the analytic distribution field on an Employee 3. Notice the error being thrown when trying to save Cause: Analytic distribution field is a JSON field and JSON field and tracking is not supported on JSON fields. https://github.com/odoo/odoo/blob/2aa35eb9c7a709126dca65e81ca6e823706fbb19/addons/mail/models/mail_tracking_value.py#L172 Tracking is supported for other fields but is not supported for JSON fields, so setting tracking=True on a JSON fields leads to an error being thrown. The error gets thrown whenever the field is edited. Caused by 88a3e70 , as a result of this comment https://github.com/odoo/odoo/blob/0133e46f89df7dce8c39d2bacd29579d57a83fad/addons/hr/models/hr_version.py#L443 that mentioned that whitelisted fields should have tracking set to true. However, that's not necessary. opw-6405122 Forward-Port-Of: odoo/enterprise#125135
Belgian EC Sales List XML and PDF exports now use the foreign VAT number set on the relevant fiscal position instead of the company’s domestic VAT number. This helps companies reporting in another country submit compliant declarations with the correct declarant reference.
Original PR description
### Issue before this commit: When a company generates an EC Sales List for a foreign country (e.g., a Luxembourgish company running a Belgian report), the exported XML and PDF files incorrectly…
### Issue before this commit: When a company generates an EC Sales List for a foreign country (e.g., a Luxembourgish company running a Belgian report), the exported XML and PDF files incorrectly display the company's primary domestic VAT number instead of the foreign VAT number defined in the fiscal position in the tag DeclarantReference. ### Steps to reproduce the issue: 1. Download Accounting and l10n_lu 2. Switch to LU company 3. Go to Fiscal Positions in settings and create the Belgian position (insert country as Belgium and Foreign Tax ID as BE0477472701) 4. A pop up will appear saying: Click to create the taxes for this country. so click there to create the taxes 5. Go to Invoices and create a new invoice and be sure that: 1. be sure the customer has a VAT number in their profile 2. in tab Other Info the Fiscal Position is set to Belgium 3. the tax applied is 0% EU S (BE) 4. date of invoice is in June 6. Open the tax return in 1 July 7. Open EC Sales List June 2026 (BE) and mark as reviewed all the lines 8. Click on Validate 9. Open the XML and PDF file created and see that the tag DeclarantReference is wrong because it reports the data of LU company instead of BE company ### Cause of the issue: The `export_to_xml_sales_report` method relied on legacy code (company.partner_id.vat) to fetch the VAT number. It failed to use the centralized `get_vat_for_export(options)` method, thereby completely bypassing the foreign VAT logic correctly implemented in other tax reports. ### Reason to introduce the fix: To ensure tax compliance by appling the correct VAT number from the foreign fiscal position. opw-6170447 Forward-Port-Of: odoo/enterprise#125210 Forward-Port-Of: odoo/enterprise#124698
14 changes
Enhancements to existing features
When a user selects a project in the timesheet timer, Odoo now automatically fills in the task they most recently logged time on for that project. Helpdesk projects get the same convenience by preselecting the most recently used ticket, reducing clicks for recurring time entries.
Original PR description
When selecting a project in the timesheet timer, the task on which the user most recently logged time for that project is now prefilled, as they are most likely to keep logging time on it. If not, selecting a different task only requires one click. For Helpdesk projects, where the timer shows the ticket field instead of the task field, the most recently timesheeted ticket is prefilled in the same way. task-6359030 Forward-Port-Of: odoo/enterprise#124010
Spreadsheet users can now show the readable name of a selected global filter value, such as a customer name, instead of only its internal ID. This makes spreadsheet reports easier to understand and share with business users.
Original PR description
Before this commit: If you use ODOO.FILTER.VALUE and have a customer set in the global filter, it returns the id of the customer. That can be useful in some cases but in others you might simply want the label. Task: 6167605 Forward-Port-Of: odoo/enterprise#121004 Forward-Port-Of: odoo/enterprise#115984
The employee time off planning view now loads absence data in larger batches and only for the requested date range. This makes the view much faster for teams with many employees, reducing wait times from several seconds to around one second in large scenarios.
Original PR description
At odoo, our friendly kitchen chef needs to know who is off on any given day. To know that, they use the holiday gantt view and display all employees and check the sum. For 200+ employees working at GR2, `get_gantt_data` takes 7+ seconds `_unavailable_intervals_batch` is called for each individual version, which means it's not batched. Ultimatly, it leads to lots of sql queries that could be grouped together. With this commit, the calls are batched per calendar before: ~7s after: ~900ms-1s Forward-Port-Of: odoo/enterprise#124820
The ActivityWatch suggestions panel now shows total tracked time per project and a grand total across all suggestions. This gives users a clearer view of their logged hours directly in the timesheet workflow, helping them review and validate time entries more easily.
Original PR description
This commit introduces new time tracking metrics to the ActivityWatch suggestions panel to improve user visibility into their tracked hours. **Enhancements:** - Added the total duration per project in the By Project grouped view. - Added a grand total footer for all suggestions at the bottom of the list. task-6088877 Forward-Port-Of: odoo/enterprise#114772
Resolved issues and error corrections
Fixed an issue where importing a Chilean electronic invoice file with multiple documents could put all invoice lines and references onto the first vendor bill. Each imported document is now kept separate, helping prevent incorrect bill totals and reconciliation problems.
Original PR description
When importing an EnvioDTE XML containing several DTEs (journal upload or incoming DTE mail server), one vendor bill is created per DTE, but the first bill receives the invoice lines and references…
When importing an EnvioDTE XML containing several DTEs (journal upload or incoming DTE mail server), one vendor bill is created per DTE, but the first bill receives the invoice lines and references of ALL the DTEs in the file, causing the total amount mismatch.
Cause: `_split_xml_into_new_attachments()` creates new attachments for the documents beyond the first one but leaves the original `file_data['xml_tree']` untouched; the decoder must scope itself to the first document (as l10n_it_edi and l10n_es_edi_facturae do), which `_l10n_cl_import_dte()` never did.
e.g. l10n_es_edi_facturae:633:
```python
# Only decode the first invoice of the Factura-e file.
tree = tree.xpath('//Invoice')[0]
```
Fix: scope the tree to the first DTE node before filling the bill. Kept behind a `len > 1` guard so files with a bare <DTE> root (matched by `xpath('//ns0:DTE')` but not by `findall('.//ns0:DTE')`) keep working.
Introduced in: https://github.com/odoo/enterprise/pull/75327.
opw-6378954
Forward-Port-Of: odoo/enterprise#124691Fixed an issue in Chilean electronic delivery guides where delivering a kit could fail if its components used different units of measure than the kit itself. The guide now prices those component lines directly from the product when needed, preventing errors and allowing the delivery document to be printed successfully.
Original PR description
When a kit is delivered, each component move is linked to the kit's sale order line. Pricing the delivery guide in "sale order" mode converted the component quantity into the kit's sale UoM. For a component sold in a different UoM category than the kit, this cross-category conversion raises a UserError. Steps to reproduce: - Create a BoM for a kit product with a component in a different UoM category - Create a customer with Delivery Guide Price = "From Sale Order" - Sold the kit in a sale order and deliver it - On the delivery, print the delivery guide -> error This fix makes the guide price for a component move to be "product" if the component's product is different from the related sale line product, avoiding the cross-category UoM conversion. opw-6327895 Forward-Port-Of: odoo/enterprise#125199 Forward-Port-Of: odoo/enterprise#122776
Product managers can now use barcode lookup to automatically fill product details without needing full administrator access. This keeps product creation workflows efficient while avoiding unnecessary elevated permissions.
Original PR description
Currently when a user with a product manager rights that is not admin tries to look up the product with barcode information is not auto filled. ## Steps to replicate: - Install stock with demo data -…
Currently when a user with a product manager rights that is not admin tries to look up the product with barcode information is not auto filled. ## Steps to replicate: - Install stock with demo data - Barcode Database > Setup barcode lookup credentials - Users > Marc Demo > Give Marc Demo > Master Data > Products > Create - Login as `Marc Demo` - Products > Barcode: `850049670180` > Click anywhere else ## Observed Behaviour: Information on the product template is not autofilled, as it would be when using a System Admin user(Mitchell Admin). ## Root cause: This issue occurs because barcode lookup is gated behind a check for System Admin rights. Although users in the Product Manager group have permission to create products, they do not satisfy this condition, so the barcode lookup never executes at [1]. [1]- https://github.com/odoo/enterprise/blob/c66995fda83e19b28a38312af8efdc1601881cf0/product_barcodelookup/models/product_template.py#L17-L22 ## Why this is an issue: The original restriction (task [2] and commit [3]) was intended to limit barcode lookup to users who can create products, preventing unnecessary API calls. This was a valid assumption in 17.3-18.0, where creating products in POS required System Admin rights but now after commit [4] this is no longer the case. In v18, task [5] introduced the Product Manager group, making product creation independent of System Admin rights or module rights. Later, v18.3 exposed these Master Data access rights to non-debug users through commit [6]. As a result, there are users who are legitimately responsible for product creation and maintenance (regardless of POS usage) they can no longer use barcode lookup unless they are also granted full System Admin privileges, which provides broader access than required. ## Solution: Remove the group-based permission check so that access is determined solely by product edit permissions. This ensures that only users with the ability to modify products can use the API call, preserving the original security intent. As a result, users no longer need unnecessary administrative privileges toperform barcode lookups. [2]: https://www.odoo.com/odoo/project/49/tasks/3911024 [3]: https://github.com/odoo/enterprise/commit/444df3e48cb8d479d3b5d4a03a4bfefa48650910 [4]: https://github.com/odoo/odoo/commit/821bbc4504fd80a508e2412c7490ee60dd03f7b8 [5]: https://github.com/odoo/odoo/commit/d4886faf12ccaf63d5e899c20df2543d1ce046ab [6]: https://github.com/odoo/odoo/commit/e74eaf628498155243db73ea229eaf5e74c24f2a opw-6290999 Forward-Port-Of: odoo/enterprise#121915
French VAT declarations can now be sent successfully even when the company SIRET number contains spaces, reducing avoidable filing errors. Users will also be warned when a bank account number appears incorrectly formatted, helping them correct payment details before submission.
Original PR description
This commit resolves an issue where VAT declarations failed when the provided SIRET number included spaces. Since check_siret verifies the format, we now strip all spaces from the input. Additionally, this commit introduces a validation for bank account numbers, ensuring that we warn the user if the account number is wrongly formatted. task-6253745 Forward-Port-Of: odoo/enterprise#124870 Forward-Port-Of: odoo/enterprise#120689
Applying Engineering Change Orders with uploaded documents no longer fails because the system now links copied documents to the correct attachment record. This helps manufacturing teams apply product changes reliably without manual cleanup or unexpected errors.
Original PR description
When applying an ECO, `action_apply` copies each ECO document onto the product template and fills `origin_attachment_id` with `attach.id`. That field is a many2one to `ir.attachment`, but `attach` is a `product.document`. Steps to reproduce: - Create an `mrp.eco` record and start a new revision - Upload a document on the ECO, note its product.document id - Make sure no ir.attachment exists with that same id - Move the ECO to its final stage and hit "Apply Changes" - Observe the error The very same change was already applied on master by 3a39186f883, but was never backported. opw-6387343 Forward-Port-Of: odoo/enterprise#124950
Electronic invoices sent from Colombian branches now use the parent company's official name in the DIAN XML. This helps DIAN correctly match the invoice to the company's tax ID and avoids rejections caused by branch names.
Original PR description
The correct behavior should be to use the original company name in this specific XML tag For the DIAN, branch names will not be recognized as related to the NIT. So, when sending electronic invoices from a branch, the XML should use the name of the parent company of that branch. Ticket [link](https://www.odoo.com/odoo/project.task/6074280) opw-6074280 Forward-Port-Of: odoo/enterprise#115494
The Belgian EC Sales List export now uses the correct foreign VAT number when a company files a Belgian report from another country. This helps ensure XML and PDF reports show compliant declarant details for cross-border tax reporting.
Original PR description
### Issue before this commit: When a company generates an EC Sales List for a foreign country (e.g., a Luxembourgish company running a Belgian report), the exported XML and PDF files incorrectly…
### Issue before this commit: When a company generates an EC Sales List for a foreign country (e.g., a Luxembourgish company running a Belgian report), the exported XML and PDF files incorrectly display the company's primary domestic VAT number instead of the foreign VAT number defined in the fiscal position in the tag DeclarantReference. ### Steps to reproduce the issue: 1. Download Accounting and l10n_lu 2. Switch to LU company 3. Go to Fiscal Positions in settings and create the Belgian position (insert country as Belgium and Foreign Tax ID as BE0477472701) 4. A pop up will appear saying: Click to create the taxes for this country. so click there to create the taxes 5. Go to Invoices and create a new invoice and be sure that: 1. be sure the customer has a VAT number in their profile 2. in tab Other Info the Fiscal Position is set to Belgium 3. the tax applied is 0% EU S (BE) 4. date of invoice is in June 6. Open the tax return in 1 July 7. Open EC Sales List June 2026 (BE) and mark as reviewed all the lines 8. Click on Validate 9. Open the XML and PDF file created and see that the tag DeclarantReference is wrong because it reports the data of LU company instead of BE company ### Cause of the issue: The `export_to_xml_sales_report` method relied on legacy code (company.partner_id.vat) to fetch the VAT number. It failed to use the centralized `get_vat_for_export(options)` method, thereby completely bypassing the foreign VAT logic correctly implemented in other tax reports. ### Reason to introduce the fix: To ensure tax compliance by appling the correct VAT number from the foreign fiscal position. opw-6170447 Forward-Port-Of: odoo/enterprise#125210 Forward-Port-Of: odoo/enterprise#124698
Point of Sale IoT now works better with newer IoT Boxes that no longer provide some device details. The system avoids relying on missing information when finding printers or payment devices, reducing setup and connection issues.
Original PR description
Newer IoT Boxes don't share device subtype or manufacturer. We then adapt the domains to avoid searching on fields that aren't filled. task-6388669 task-6388733 Forward-Port-Of: odoo/enterprise#125201 Forward-Port-Of: odoo/enterprise#124306
This fixes an issue that blocked users from saving changes to analytic distribution settings on employee records. The field remains available for payroll accounting setup, but it is no longer tracked in a way that causes save errors.
Original PR description
Problem: Users cannot change analytic distribution set on employees. Users encounter an error when trying to change it. Steps to reproduce: 1. Enable analytic accounting 2. Try to edit the analytic…
Problem: Users cannot change analytic distribution set on employees. Users encounter an error when trying to change it. Steps to reproduce: 1. Enable analytic accounting 2. Try to edit the analytic distribution field on an Employee 3. Notice the error being thrown when trying to save Cause: Analytic distribution field is a JSON field and JSON field and tracking is not supported on JSON fields. https://github.com/odoo/odoo/blob/2aa35eb9c7a709126dca65e81ca6e823706fbb19/addons/mail/models/mail_tracking_value.py#L172 Tracking is supported for other fields but is not supported for JSON fields, so setting tracking=True on a JSON fields leads to an error being thrown. The error gets thrown whenever the field is edited. Caused by 88a3e70 , as a result of this comment https://github.com/odoo/odoo/blob/0133e46f89df7dce8c39d2bacd29579d57a83fad/addons/hr/models/hr_version.py#L443 that mentioned that whitelisted fields should have tracking set to true. However, that's not necessary. opw-6405122 Forward-Port-Of: odoo/enterprise#125135
Users opening account reports from VAT return checks can now refresh the page without losing the report or seeing an error. This makes the VAT return workflow more reliable while leaving reports opened from menus unchanged.
Original PR description
Opening an account report through the VAT return button on an account.return.check record returns an inline client action whose report_id only exists in context. On refresh, Odoo will throw an error because it will try to rebuild the action context based off of the URL which is deficient. This will not effect reports opened via the menu since those follow a different pathway. This fix anchors the inline action to the "path" property stored on the client action. A helper method was added for deriving the action_id from a given report. opw-6366964 Forward-Port-Of: odoo/enterprise#125246 Forward-Port-Of: odoo/enterprise#124560
3 changes
Resolved issues and error corrections
Product managers can now use barcode lookup to automatically fill product details without needing full system administrator access. This keeps product creation workflows efficient while avoiding unnecessary admin privileges.
Original PR description
Currently when a user with a product manager rights that is not admin tries to look up the product with barcode information is not auto filled. ## Steps to replicate: - Install stock with demo data -…
Currently when a user with a product manager rights that is not admin tries to look up the product with barcode information is not auto filled. ## Steps to replicate: - Install stock with demo data - Barcode Database > Setup barcode lookup credentials - Users > Marc Demo > Give Marc Demo > Master Data > Products > Create - Login as `Marc Demo` - Products > Barcode: `850049670180` > Click anywhere else ## Observed Behaviour: Information on the product template is not autofilled, as it would be when using a System Admin user(Mitchell Admin). ## Root cause: This issue occurs because barcode lookup is gated behind a check for System Admin rights. Although users in the Product Manager group have permission to create products, they do not satisfy this condition, so the barcode lookup never executes at [1]. [1]- https://github.com/odoo/enterprise/blob/c66995fda83e19b28a38312af8efdc1601881cf0/product_barcodelookup/models/product_template.py#L17-L22 ## Why this is an issue: The original restriction (task [2] and commit [3]) was intended to limit barcode lookup to users who can create products, preventing unnecessary API calls. This was a valid assumption in 17.3-18.0, where creating products in POS required System Admin rights but now after commit [4] this is no longer the case. In v18, task [5] introduced the Product Manager group, making product creation independent of System Admin rights or module rights. Later, v18.3 exposed these Master Data access rights to non-debug users through commit [6]. As a result, there are users who are legitimately responsible for product creation and maintenance (regardless of POS usage) they can no longer use barcode lookup unless they are also granted full System Admin privileges, which provides broader access than required. ## Solution: Remove the group-based permission check so that access is determined solely by product edit permissions. This ensures that only users with the ability to modify products can use the API call, preserving the original security intent. As a result, users no longer need unnecessary administrative privileges toperform barcode lookups. [2]: https://www.odoo.com/odoo/project/49/tasks/3911024 [3]: https://github.com/odoo/enterprise/commit/444df3e48cb8d479d3b5d4a03a4bfefa48650910 [4]: https://github.com/odoo/odoo/commit/821bbc4504fd80a508e2412c7490ee60dd03f7b8 [5]: https://github.com/odoo/odoo/commit/d4886faf12ccaf63d5e899c20df2543d1ce046ab [6]: https://github.com/odoo/odoo/commit/e74eaf628498155243db73ea229eaf5e74c24f2a opw-6290999 Forward-Port-Of: odoo/enterprise#121915
This fixes an issue where Six payment receipts were not printed together with point of sale receipts. Businesses using Six payment terminals can now provide customers with the expected complete receipt set at checkout.
Original PR description
This PR fixes the Six receipts not being printed together with point of sale receipts task-6409438
Mexican electronic invoicing now updates the Tax Object field when a unit price is added after an invoice line was first saved with a zero price. This helps invoices keep the correct tax information without manual correction, reducing billing errors and compliance risk.
Original PR description
**Steps to reproduce the issue:** - Install the l10n_mx_edi module. - Open the Accounting app and go to Customers → Invoices. - From the invoice line, make the Tax Object field visible. - Create a…
**Steps to reproduce the issue:** - Install the l10n_mx_edi module. - Open the Accounting app and go to Customers → Invoices. - From the invoice line, make the Tax Object field visible. - Create a new invoice and add a product that has no Unit Price. - Save the invoice. - Edit the same invoice, set a Unit Price for the product, and save it again. - Issue: The Tax Object field is not automatically set after the Unit Price is added. **Description:** - In our standard code, there is a condition that skips computing the Tax Object when the Unit Price is [0](https://github.com/odoo/enterprise/blob/615a5f756d708db95e22cdbdd6e7aca72ac769ec/l10n_mx_edi/models/account_move.py#L988). This is the expected behavior. - However, after setting a Unit Price on the product, the Tax Object is not recomputed, so it remains unset. - To resolve this issue, I added price_unit to the @api.depends decorator so that the Tax Object is recomputed whenever the Unit Price changes. **Reference videos:** Before the fix: [screen-capture (2).webm](https://github.com/user-attachments/assets/c1162fd9-52b8-4a8c-9ac2-39cf2ca3ad69) After the fix: [screen-capture (1).webm](https://github.com/user-attachments/assets/1c05dc34-6778-487a-9bfc-635cf652e670) OPW -6305080 UPG - 4268848 Forward-Port-Of: odoo/enterprise#123009
9 changes
Resolved issues and error corrections
Belgian EC Sales List PDF and XML exports now use the foreign VAT number set on the fiscal position when a company files for Belgium from another country. This prevents reports from showing the company's domestic VAT number and helps ensure compliant tax submissions.
Original PR description
### Issue before this commit: When a company generates an EC Sales List for a foreign country (e.g., a Luxembourgish company running a Belgian report), the exported XML and PDF files incorrectly…
### Issue before this commit: When a company generates an EC Sales List for a foreign country (e.g., a Luxembourgish company running a Belgian report), the exported XML and PDF files incorrectly display the company's primary domestic VAT number instead of the foreign VAT number defined in the fiscal position in the tag DeclarantReference. ### Steps to reproduce the issue: 1. Download Accounting and l10n_lu 2. Switch to LU company 3. Go to Fiscal Positions in settings and create the Belgian position (insert country as Belgium and Foreign Tax ID as BE0477472701) 4. A pop up will appear saying: Click to create the taxes for this country. so click there to create the taxes 5. Go to Invoices and create a new invoice and be sure that: 1. be sure the customer has a VAT number in their profile 2. in tab Other Info the Fiscal Position is set to Belgium 3. the tax applied is 0% EU S (BE) 4. date of invoice is in June 6. Open the tax return in 1 July 7. Open EC Sales List June 2026 (BE) and mark as reviewed all the lines 8. Click on Validate 9. Open the XML and PDF file created and see that the tag DeclarantReference is wrong because it reports the data of LU company instead of BE company ### Cause of the issue: The `export_to_xml_sales_report` method relied on legacy code (company.partner_id.vat) to fetch the VAT number. It failed to use the centralized `get_vat_for_export(options)` method, thereby completely bypassing the foreign VAT logic correctly implemented in other tax reports. ### Reason to introduce the fix: To ensure tax compliance by appling the correct VAT number from the foreign fiscal position. opw-6170447 Forward-Port-Of: odoo/enterprise#124698
Applying engineering change orders with attached documents could fail because the system linked the copied document to the wrong internal record type. This fix ensures documents are linked correctly, allowing ECO changes to be applied reliably.
Original PR description
When applying an ECO, `action_apply` copies each ECO document onto the product template and fills `origin_attachment_id` with `attach.id`. That field is a many2one to `ir.attachment`, but `attach` is a `product.document`. Steps to reproduce: - Create an `mrp.eco` record and start a new revision - Upload a document on the ECO, note its product.document id - Make sure no ir.attachment exists with that same id - Move the ECO to its final stage and hit "Apply Changes" - Observe the error The very same change was already applied on master by 3a39186f883, but was never backported. opw-6387343
Swiss payroll contract templates now show the same relevant wage fields as employee contracts and correctly transfer those values when a template is loaded. This prevents missing or incorrect wage setup for Swiss employees, especially for hourly, monthly, or lesson-based pay types.
Original PR description
## Issue When creating a Contract Template for a Swiss company, the template does not match the version shown in the Employee's view. Also, some fields are not correctly applied when loading a…
## Issue
When creating a Contract Template for a Swiss company, the template does not match the version shown in the Employee's view. Also, some fields are not correctly applied when loading a contract template on an employee (e.g. `hourly_wage`, `wage`, ...).
## Steps to reproduce
1. Install *Switzerland - Swissdec Certified ELM 5.0 - Payroll* (`l10n_ch_hr_payroll`)
2. (Create and) Use a Swiss company
3. In Employees > Configuration > Contract Templates, create a Contract Template
- Wage Type: Hourly Wage
- Hourly Wage: Any value > 0
- **(Notice how the aforementionned fields are missing from the template)**
4. In Employees > Employees, create an Employee
5. On the new employee's view, on the Payroll tab, click "Load Template"
and load the template created in step 3
6. **The data from the template is not applied to the employee's contract**
## Cause
The fields loaded from a contract template are listed in the `whitelist` variable of the `hr.version.wizard`:
https://github.com/odoo/odoo/blob/5c3deb11627f4d6762c4994207bd582afb96f064/addons/hr/wizard/hr_contract_template_wizard.py#L15-L30
Multiple fields were missing from the whitelist (e.g. `hourly_wage`, `l10n_ch_has_{hourly|monthly|lesson}`, ...). These fields would not be loaded from the template when applying a template on an employee.
**This commit replicates the employee's version view on the contract template and adds the related fields to the whitelist for them to be correctly applied when loading a contract template.**
opw-5966664
opw-6128467
Forward-Port-Of: odoo/enterprise#110683Account reports opened from a VAT return check no longer fail when the page is refreshed. This prevents users from losing access to the report view during review and filing workflows.
Original PR description
Opening an account report through the VAT return button on an account.return.check record returns an inline client action whose report_id only exists in context. On refresh, Odoo will throw an error because it will try to rebuild the action context based off of the URL which is deficient. This will not effect reports opened via the menu since those follow a different pathway. This fix anchors the inline action to the "path" property stored on the client action. A helper method was added for deriving the action_id from a given report. opw-6366964 Forward-Port-Of: odoo/enterprise#124560
Product managers can now use barcode lookup to automatically fill product details without needing full administrator access. This lets authorized product teams work normally while avoiding unnecessary admin permissions.
Original PR description
Currently when a user with a product manager rights that is not admin tries to look up the product with barcode information is not auto filled. ## Steps to replicate: - Install stock with demo data -…
Currently when a user with a product manager rights that is not admin tries to look up the product with barcode information is not auto filled. ## Steps to replicate: - Install stock with demo data - Barcode Database > Setup barcode lookup credentials - Users > Marc Demo > Give Marc Demo > Master Data > Products > Create - Login as `Marc Demo` - Products > Barcode: `850049670180` > Click anywhere else ## Observed Behaviour: Information on the product template is not autofilled, as it would be when using a System Admin user(Mitchell Admin). ## Root cause: This issue occurs because barcode lookup is gated behind a check for System Admin rights. Although users in the Product Manager group have permission to create products, they do not satisfy this condition, so the barcode lookup never executes at [1]. [1]- https://github.com/odoo/enterprise/blob/c66995fda83e19b28a38312af8efdc1601881cf0/product_barcodelookup/models/product_template.py#L17-L22 ## Why this is an issue: The original restriction (task [2] and commit [3]) was intended to limit barcode lookup to users who can create products, preventing unnecessary API calls. This was a valid assumption in 17.3-18.0, where creating products in POS required System Admin rights but now after commit [4] this is no longer the case. In v18, task [5] introduced the Product Manager group, making product creation independent of System Admin rights or module rights. Later, v18.3 exposed these Master Data access rights to non-debug users through commit [6]. As a result, there are users who are legitimately responsible for product creation and maintenance (regardless of POS usage) they can no longer use barcode lookup unless they are also granted full System Admin privileges, which provides broader access than required. ## Solution: Remove the group-based permission check so that access is determined solely by product edit permissions. This ensures that only users with the ability to modify products can use the API call, preserving the original security intent. As a result, users no longer need unnecessary administrative privileges toperform barcode lookups. [2]: https://www.odoo.com/odoo/project/49/tasks/3911024 [3]: https://github.com/odoo/enterprise/commit/444df3e48cb8d479d3b5d4a03a4bfefa48650910 [4]: https://github.com/odoo/odoo/commit/821bbc4504fd80a508e2412c7490ee60dd03f7b8 [5]: https://github.com/odoo/odoo/commit/d4886faf12ccaf63d5e899c20df2543d1ce046ab [6]: https://github.com/odoo/odoo/commit/e74eaf628498155243db73ea229eaf5e74c24f2a opw-6290999 Forward-Port-Of: odoo/enterprise#121915
Fixed an issue in Chilean electronic document imports where a file containing multiple invoices could put all invoice lines and references onto the first vendor bill. Each imported invoice is now kept separate, helping prevent incorrect bill totals and reconciliation problems.
Original PR description
When importing an EnvioDTE XML containing several DTEs (journal upload or incoming DTE mail server), one vendor bill is created per DTE, but the first bill receives the invoice lines and references…
When importing an EnvioDTE XML containing several DTEs (journal upload or incoming DTE mail server), one vendor bill is created per DTE, but the first bill receives the invoice lines and references of ALL the DTEs in the file, causing the total amount mismatch.
Cause: `_split_xml_into_new_attachments()` creates new attachments for the documents beyond the first one but leaves the original `file_data['xml_tree']` untouched; the decoder must scope itself to the first document (as l10n_it_edi and l10n_es_edi_facturae do), which `_l10n_cl_import_dte()` never did.
e.g. l10n_es_edi_facturae:633:
```python
# Only decode the first invoice of the Factura-e file.
tree = tree.xpath('//Invoice')[0]
```
Fix: scope the tree to the first DTE node before filling the bill. Kept behind a `len > 1` guard so files with a bare <DTE> root (matched by `xpath('//ns0:DTE')` but not by `findall('.//ns0:DTE')`) keep working.
Introduced in: https://github.com/odoo/enterprise/pull/75327.
opw-6378954
Forward-Port-Of: odoo/enterprise#124691Subscription products now show discounted recurring prices correctly on shop product tiles. This prevents customers from seeing prices calculated from the one-time sale price instead of the selected subscription plan price.
Original PR description
Steps to reproduce: =================== 1. Create a subscription product, allow one-time sale, sale price 5 2. Add a recurring price 10/month 3. On the pricelist, add an advanced rule: -10% for the…
Steps to reproduce: =================== 1. Create a subscription product, allow one-time sale, sale price 5 2. Add a recurring price 10/month 3. On the pricelist, add an advanced rule: -10% for the monthly plan 4. Open the shop page and look at the product tile Cause: ======= On the /shop page, the subscription price displayed on a product tile is computed by `_get_sales_prices`. The cart has no plan selected yet at that point, so `request.cart.plan_id.id` is empty and was passed as `plan_id` to `_compute_price`. In `product.pricelist.item._compute_base_price`, the recurring base price is only looked up when a `plan_id` is given: if rule_base == 'list_price' and product.recurring_invoice and plan_id: ... # find the recurring rule -> base = recurring price With `plan_id` empty, that branch is skipped and the percentage rule falls back on the product's one-time `list_price` instead of the recurring price. Example: one-time price 5, recurring price 10/month, pricelist rule -10% on the monthly plan. => Tile showed 4.5/month (5 * 0.9) instead of 9/month (10 * 0.9). Solution: ========= The chosen pricing already targets a plan, so pass `pricing.plan_id.id` to `_compute_price`, matching what the product page does in `_get_additionnal_combination_info`. opw-6307398 Forward-Port-Of: odoo/enterprise#120872
Electronic invoices sent from Colombian branch companies now use the parent company name in the required DIAN XML field. This helps DIAN correctly match the invoice to the registered tax ID and avoids rejections caused by branch names not being recognized.
Original PR description
The correct behavior should be to use the original company name in this specific XML tag For the DIAN, branch names will not be recognized as related to the NIT. So, when sending electronic invoices from a branch, the XML should use the name of the parent company of that branch. Ticket [link](https://www.odoo.com/odoo/project.task/6074280) opw-6074280 Forward-Port-Of: odoo/enterprise#115494
Customers can no longer complete payment for planning-based rental services when the requested time slot has no available resources. The cart now checks resource availability before checkout, helping avoid paid orders that cannot be fulfilled.
Original PR description
**Problem:** On a website with rental planning enabled, a customer can book a planning-backed rental product through eCommerce even when no planning resource is free for the requested window. The…
**Problem:** On a website with rental planning enabled, a customer can book a planning-backed rental product through eCommerce even when no planning resource is free for the requested window. The cart lets them increase the quantity past the available capacity and proceed all the way through checkout without any availability gate. **Steps to reproduce:** 1. Install `website_sale_renting_planning`. 2. Create a planning role with `sync_shift_rental` and one resource. 3. Create a service product with `rent_ok=True`, `planning_enabled=True` and the role above. 4. Pre-book the resource for some window via a `planning.slot`. 5. From eCommerce, add the product to the cart for the same window. 6. Proceed to checkout/payment. **Current behavior:** The cart is considered ready, no warning is shown, and payment can proceed even though no planning resource is free for the chosen period. **Expected behavior:** The cart should be flagged as not ready and pre-payment validation should refuse to confirm until the customer picks a different date or quantity. **Cause of the issue:** `sale.order._available_dates_for_renting` in `website_sale_renting` is the documented hook for "stock availability" gating of the cart and pre-payment flow (called from `_is_cart_ready` and from `_check_cart_is_ready_to_be_paid`). `website_sale_stock_renting` overrides it to apply a per-line stock check, but `website_sale_renting_planning` has no such override, so planning-backed rental services reach payment with no availability gate at all. **Fix:** Apply the same gating pattern that `website_sale_stock_renting` already uses: override `_available_dates_for_renting` in `website_sale_renting_planning` so that, for each rental line whose product is a planning-synced rentable service, the cart is only considered valid when at least the requested quantity of planning resources is free during the rental window (mirroring the resource and leave filtering already done by `_planning_slot_vals_list_per_sol` at SO confirmation time). This puts the gate at the same point the stock-renting flow enforces it, keeping the public cart/checkout flow consistent across rentable product types. opw-6247034 Forward-Port-Of: odoo/enterprise#118943
2 changes
Resolved issues and error corrections
Fixed an issue where Avalara tax fields could be hidden on contact and product forms when working with US or Canadian records and no company was set. This helps users correctly enter Avalara codes, partner codes, and exemption details needed for tax compliance.
Original PR description
**Steps to reproduce:**
- Install Accounting and account_avatax
- Use a US company (by default)
- Create a contact with Canada as country
**Issue:**
In "Sales & Purchase" tab, all the fields from avatax module are not displayed (i.e. "Avalara Code", "Avalara Partner Code", "Avalara Exemption").
**Cause:**
The `invisible` property of those fields is using `fiscal_country_codes` char field.
If no company is set on the record, `fiscal_country_codes` will contain the country code of the selected companies in addition to the country code of the record.
In this case, the value of `fiscal_country_codes` will be `US,CA` string, which triggers `fiscal_country_codes not in ('US', 'CA')` invisible condition.
opw-6328395
Forward-Port-Of: odoo/enterprise#124619Uruguayan export electronic invoices that are fully discounted to zero now include the required discount details in the official CFE file. This helps exporters submit compliant invoices to Uruware while still declaring the value of goods or services for customs and trade requirements.
Original PR description
## Problem When generating an export CFE (e-Factura Exportación) in the Uruguayan EDI module, invoices that include a discount line equal to the subtotal — resulting in a **total of 0.00** — were not…
## Problem When generating an export CFE (e-Factura Exportación) in the Uruguayan EDI module, invoices that include a discount line equal to the subtotal — resulting in a **total of 0.00** — were not handled correctly by the XML/CFE generation logic. This use case is valid and required by exporters who need to reflect the declared value of goods/services while invoicing at zero (e.g. to comply with customs or incoterm requirements such as FCA). In Uruware's validation portal, the "Descuentos y Recargos" (discounts & surcharges) section of the subtotal block must be correctly populated for the CFE to be accepted. **Example:** An invoice with a line of 648.00 UYU and a global discount of −648.00 UYU → Total: 0.00. The export value is still declared, taxes are zero, but the CFE must reflect the discount amount explicitly. <img width="592" height="679" alt="example_expo_invoice_discount" src="https://github.com/user-attachments/assets/aa83c158-e342-4da5-a251-fc209bbed5c4" /> ## Root Cause The CFE template (`cfe_template.xml`) and the move computation logic (`account_move.py`) did not account for the case where export invoices carry line-level or global discounts that zero out the total. The discount amount was either omitted from the XML nodes or computed incorrectly, causing Uruware validation to fail or the discount block to not render. ## Fix - **`l10n_uy_edi/models/account_move.py`** — Updated the export invoice computation to correctly include discount amounts in the CFE data dict, ensuring the `ValorDR` is filled with the value of the discount per line. - **`l10n_uy_edi/views/cfe_template.xml`** — Adjusted the template condition so `MntExpoyAsim` node accepts 0 as value. ## Steps to Reproduce (before fix) 1. Create an export invoice (e-Factura Exportación) for a foreign partner. 2. Add a product line with a unit price, e.g. 216.00 × 3 = 648.00 UYU. 3. Add a global discount of 648.00 (same amount) so the total is 0.00. 4. Confirm and send to Uruware — the CFE is rejected / discount block is missing. ## Verification After the fix, the same invoice generates a valid CFE accepted by Uruware with the discount correctly reflected in the `DscRcgGlobal` node and the discount line visible on the printed document. Forward-Port-Of: odoo/enterprise#120130
4 changes
Resolved issues and error corrections
Swedish ISO 20022 payment files are adjusted to meet Swedbank requirements, including the correct identification scheme and debtor ID format. This helps prevent payment file rejections and also updates Swedish payment XML address formatting ahead of upcoming structured address requirements.
Original PR description
Fix some issues with the iso20022 XML file for Sweden:
1. Swedbank doesn't allow the us of `CUST` value in the `SchmeNm`
node but force the `BANK` value.
2. Currently, we use the same Id in both `InitgPty` & `Dbtr`, which
looks to be wrong with Swedbank. The format for Swedbank is
`06{company_registry}B001`.
opw-5395736
Forward-Port-Of: odoo/enterprise#122119Guatemalan credit notes now reference the original invoice's actual issue date instead of a technical certification timestamp. This helps ensure the electronic document matches SAT validation requirements and avoids rejection when credit note dates differ from invoice dates.
Original PR description
### Issue before this commit: When reverting a Guatemalan invoice (creating a credit note), the XML node FechaEmisionDocumentoOrigen incorrectly reports the EDI document's technical certification…
### Issue before this commit: When reverting a Guatemalan invoice (creating a credit note), the XML node FechaEmisionDocumentoOrigen incorrectly reports the EDI document's technical certification date instead of the original invoice's emission date. This causes the SAT to reject the document. ### Steps to reproduce the issue: 1. Download Accounting and l10n_gt 2. Revert an invoice (credit note) inserting a different date than the one of the invoice 3. See that FechaEmisionDocumentoOrigen report the date of the credit note instead of the one of the invoice ### Cause of the issue: The _l10n_gt_edi_add_reference_values method extracted the date from original_document.datetime (the technical timestamp of when the XML was generated) rather than using the actual accounting date of the original invoice. ### Reason to introduce the fix: SAT validation rules strictly require the reference date to match the exact commercial emission date of the original invoice. Fetching invoice_date directly ensures compliance, avoids timezone conversion errors, and prevents the XML from being rejected. Source: https://www.lawinsider.com/es/contracts/dJXl4Vo79L2 <img width="730" height="205" alt="2026-07-17_10-19" src="https://github.com/user-attachments/assets/802e7bb3-fcf9-48db-b86f-227b494001b6" /> opw-6394409 Forward-Port-Of: odoo/enterprise#124794
This fixes an issue where Avalara-related fields could disappear on contact and product forms when country information included both the company and record countries. Users working with US and Canadian tax settings can now see the expected Avalara fields consistently.
Original PR description
**Steps to reproduce:**
- Install Accounting and account_avatax
- Use a US company (by default)
- Create a contact with Canada as country
**Issue:**
In "Sales & Purchase" tab, all the fields from avatax module are not displayed (i.e. "Avalara Code", "Avalara Partner Code", "Avalara Exemption").
**Cause:**
The `invisible` property of those fields is using `fiscal_country_codes` char field.
If no company is set on the record, `fiscal_country_codes` will contain the country code of the selected companies in addition to the country code of the record.
In this case, the value of `fiscal_country_codes` will be `US,CA` string, which triggers `fiscal_country_codes not in ('US', 'CA')` invisible condition.
opw-6328395
Forward-Port-Of: odoo/enterprise#124619Spanish VAT record books now include taxable accounting entries created outside standard invoices and bills, such as Point of Sale session closures. This helps businesses produce more complete VAT reports and avoid missing tax obligations in exported records.
Original PR description
Currently, the Spanish VAT record books (Libros Registro de IVA) only include move types associated with invoices and bills. However, miscellaneous entries (type 'entry'), such as those generated by the Point of Sale session closures or manual liquidations, also carry tax obligations and must be reflected in these reports. Steps to reproduce: - Open a POS Session - Create an order, pay and close session - Go to Accouting > Reporting > Tax report - Select Generic Tax report - Print "VAT record Books" Issue: Only invoices and bills are visible in the excel file, and not the entry generated from point of sale. However, movements that are not related to invoices should be included in the VAT books. opw-5862529 Forward-Port-Of: odoo/enterprise#125011 Forward-Port-Of: odoo/enterprise#113681
1 change
Resolved issues and error corrections
The barcode app now pre-fills the product owner when scanning consigned stock, even for products without lot tracking. This prevents deliveries from creating or updating the wrong stock record and helps ensure the correct owned inventory is used.
Original PR description
### Steps to reproduce: - In the settings enable: "Storage Locations" and "Consignment" - Create a storable product and put 1 unit in stock with a set owner - Go to the barcode app > Operations >…
### Steps to reproduce: - In the settings enable: "Storage Locations" and "Consignment" - Create a storable product and put 1 unit in stock with a set owner - Go to the barcode app > Operations > Delivery Orders > New - Scan your product and validate #### > The owner was not set on the stock move line so that a new quant was created and updated in stock rather than using the available unit. ### Cause of the issue: The mechanism of prefilling an owner or a package in the barcode app is currently gate-kept behind the existence of a lot name: https://github.com/odoo/enterprise/blob/0be4f71de3420fb9b72fd4e70d48c6cbbbc0ecb4/stock_barcode/static/src/models/barcode_model.js#L1382-L1407 However, the option also make sense for none tracked products. ### Note: Performing the flow form the backend and adding quantity will generate the move line by setting the owner if possible since the quantity of a move is set via the back end, move lines are generated by looking at the existing quant data's: https://github.com/odoo/odoo/blob/5d61c03b33c9a915684dd59656f8be7612956dd1/addons/stock/models/stock_move.py#L2364 https://github.com/odoo/odoo/blob/5d61c03b33c9a915684dd59656f8be7612956dd1/addons/stock/models/stock_move.py#L2328-L2330 Setting the same owner on the new move line as on the quant we are going to reserve: https://github.com/odoo/odoo/blob/5d61c03b33c9a915684dd59656f8be7612956dd1/addons/stock/models/stock_move.py#L2337 https://github.com/odoo/odoo/blob/5d61c03b33c9a915684dd59656f8be7612956dd1/addons/stock/models/stock_move.py#L1715 Additional subtelties appearing when prefilling for non tracked product: 1. Currently the available quantity is not taken into account to determine if the the value provided to the prefilled is actually relevant, in particular if there is a quant with an available quantity of 0, it will be used as a valid value to prefill and it will parasit the prefill that could be done by other quants. 2. The location source used to determine the quants taken into account is not set on the first scan since the scan is performed without any existing line: https://github.com/odoo/enterprise/blob/4f0d25f9fe4ca8ff1b0ecd7900899a2a246ba888/stock_barcode/static/src/models/barcode_model.js#L1387 > This was not problematic with respect to tracked product since the product needs to be scanned prior to the lot, hence there is always a current line when the the lot is scanned. opw-6050657 Forward-Port-Of: odoo/enterprise#115021
25 changes
New functionality added to Odoo
Mexican payroll now supports calculating the legally required seventh day payment proportionally for weekly and 14-day pay schedules. This helps employers pay rest-day compensation more accurately when employees have absences or different weekly rest-day arrangements.
Original PR description
By Mexican labor law, employees are entitled to at least one paid rest day per week (commonly known as the Seventh Day). Depending on the contract, some schedules provide two rest days. There are two…
By Mexican labor law, employees are entitled to at least one paid rest day per week (commonly known as the Seventh Day). Depending on the contract, some schedules provide two rest days. There are two ways to pay this concept: * Fixed amount: The employee receives the full daily salary regardless of absences (already supported). * Prorated amount: Applies strictly to weekly and 14-days schedule pays. The payment is proportional to the actual time worked during the period (new feature). The prorated seventh day is calculated using the following formula: `accrued_days * work_rate * daily_salary` Where: * Accrued days: Actual days/hours worked in the period. * Work rate: A proportional factor based on the rest days and working days per week: `rest_days / working_days_per_week`. Rest days are dynamically calculated using the `hours_per_day` and `hours_per_week` fields from the `resource_calendar_id`. * Daily salary: Retrieved from the `l10n_mx_daily_salary` field. EXAMPLE 1: WEEKLY SCHEDULE WITH 1 REST DAY For a wage of 7,000 MXN weekly (daily wage = 1,000 MXN), the rate is `1/6 = 0.16666`. The payment depends on the worked days: | Worked Days | Seventh Day Amount Paid | | ----------- | ---------------------------------- | | 1 | 1 * 0.16666 * 1,000 = 166.67 MXN | | 2 | 2 * 0.16666 * 1,000 = 333.33 MXN | | 3 | 3 * 0.16666 * 1,000 = 500.00 MXN | | 4 | 4 * 0.16666 * 1,000 = 666.67 MXN | | 5 | 5 * 0.16666 * 1,000 = 833.33 MXN | | 6 | 6 * 0.16666 * 1,000 = 1,000.00 MXN | EXAMPLE 2: WEEKLY SCHEDULE WITH 2 REST DAYS For the same daily wage, but with a 5-day workweek, the rate is 2/5 = 0.4. | Worked Days | Seventh Day Amount Paid | | ----------- | -------------------------------- | | 1 | 1 * 0.40000 * 1,000 = 400.00 MXN | | 5 | 5 * 0.40000 * 1,000 = 2,000.00 MXN | * Add test_cfdi_nomina_con_septimo_dia test target: master task-5259458
A new timesheet add-on introduces AI assistant support to help users refine timesheet descriptions. The assistant rules were also simplified so messaging-related work is categorized more consistently across tools like Discord, Google Chat, and Odoo Discuss.
Original PR description
- added new module to support ai assistant capabilities - changed the assistant rules task-6376442
Enhancements to existing features
Users can now create batch payments from the payment wizard even when the payment method is not SEPA. SEPA payments keep the existing flow, ISO payments can generate downloadable XML without initiation, and other methods can still be grouped into batches.
Original PR description
Since the new payment initiation features, we added a wizard in the payment list view to allow users to create a batch or start a payment initiation. But this was only possible for SEPA payments. This commit allows users to create batch payments from this wizard with any payment methods. This works like so: - If SEPA payment -> same as before - If any ISO payment -> Not allowed to initiate the payment but can download XML - If any other methods -> Just allowed to create a batch without XML task-6272798 Forward-Port-Of: odoo/enterprise#120976
Clicking a phone number now follows the company’s mobile calling preference when VoIP cannot place the call. Users may see the softphone to check connectivity, open the native phone dialer, or choose between options, reducing confusion and accidental duplicate actions.
Original PR description
…ability When the user clicks a phone number in a PhoneField widget but VoIP is not available (canCall = false), the behavior now depends on the how_to_call_on_mobile setting: - "voip": show the softphone so the user can check the connection - "phone": fall back to the base class default (native dialer) - "ask": show a selection dialog for the user to choose We also backport the code to prevent double click from [1]. [1]: https://github.com/odoo/enterprise/commit/fa6c8747d69ffee25a7f308d26baca8500226784 Forward-Port-Of: odoo/enterprise#123065
When a user selects a project in the timesheet timer, Odoo now automatically fills in the task they most recently logged time on for that project. For Helpdesk projects, the same behavior applies to the most recent ticket, helping users start timers faster while still allowing easy changes.
Original PR description
When selecting a project in the timesheet timer, the task on which the user most recently logged time for that project is now prefilled, as they are most likely to keep logging time on it. If not, selecting a different task only requires one click. For Helpdesk projects, where the timer shows the ticket field instead of the task field, the most recently timesheeted ticket is prefilled in the same way. task-6359030 Forward-Port-Of: odoo/enterprise#124010
Self-order kiosk orders that will be paid at the counter are no longer sent to the Belgian blackbox before payment is completed. This prevents premature fiscal registration and supports mixed self-order payment flows more reliably.
Original PR description
This commits adapts the code in confirmation_page.js to not send the order to the blackbox from the kiosk if the order is not in paid state. task-id: 5960666 Forward-Port-Of: odoo/enterprise#123699 Forward-Port-Of: odoo/enterprise#117585
Uruguayan e-invoicing now lets users mark products as non-billable directly on the product record. This helps businesses report items such as manual rounding adjustments correctly to the tax authority using the required non-billable indicators.
Original PR description
Purpose: In UY e-invoicing, the DGI defines indicators 6 (positive non-billable) and 7 (negative non-billable). Currently, Odoo only supports down payment flows utilizing these indicators. However, indicators 6 and 7 are commonly used for other business cases, such as manual rounding adjustments. To support other flows outside of down payment, an explicit product-level flag is added to represent non-billable items/services in UY. Users will be able to set a product as non-billable in the Accounting tab. When an invoice containing non-billable products is sent to the DGII, it will be sent with the appropriate indicators, 6 or 7 and aggregated into MontoNf node of the CFE document. task-5904238
The automated clickbot now also verifies that screens meant to work offline still behave correctly when the network is unavailable. Several dashboards and views now open faster by showing cached information first, helping users avoid waiting while fresh data loads.
Original PR description
The clickbot only ever exercised the app while online. It now also checks that the views marked as available offline still work correctly once the network is cut, catching regressions that only show up in offline mode. task-id 6366264
The Employee Gantt view in Manufacturing now shows only employees who are currently assigned to active work orders or who worked on one in the last 30 days. This reduces clutter and helps planners focus on the employees most relevant to current production work.
Original PR description
Before, in Employee Gantt in MRP module, all employees of the company were shown, even if they have never done a work order. Now, the following employees are visible: - Employees currently assigned to any work order (not done, not cancelled) - Employee assigned to any work order in the last 30 days task-6276316
Event staff can now print attendee badges in A4 PDF format directly from the registration desk. The update also extends badge printing support to Point of Sale, making on-site event check-in and badge handling more flexible.
Original PR description
This PR adds the support for A4 pdf badge printing through the registration desk. Requested for OXP in Kenya See https://github.com/odoo/odoo/pull/275021 Forward-Port-Of: odoo/enterprise#123799 Forward-Port-Of: odoo/enterprise#123478
Spreadsheet users can now retrieve the visible label of a global filter, such as a customer name, instead of only its internal ID. This makes spreadsheet reports easier to read and share when filter values need to be displayed in a business-friendly way.
Original PR description
Before this commit: If you use ODOO.FILTER.VALUE and have a customer set in the global filter, it returns the id of the customer. That can be useful in some cases but in others you might simply want the label. Task: 6167605 Forward-Port-Of: odoo/enterprise#124746 Forward-Port-Of: odoo/enterprise#115984
Resolved issues and error corrections
The report layout now keeps the chatter panel visible at the right edge of the screen, even when financial reports are very wide. This helps users continue discussions and collaboration without needing to scroll horizontally across large reports.
Original PR description
Issue: - When reports are large/wide, the chatter component is pushed beyond the visible viewport, appearing only at the absolute right edge of the overflowing report rather than the right edge of the screen. Fix: - Updated the layout container to prevent the chatter from shrinking or overflowing with the report block, ensuring the main report scrolls independently while the chatter stays pinned to the screen viewport. Impact: - Keeps the chatter panel fully visible on the right side of the screen, allowing users to communicate without scrolling horizontally on wide reports. task-[6376792](https://www.odoo.com/odoo/project/967/tasks/6376792) Forward-Port-Of: odoo/enterprise#125126 Forward-Port-Of: odoo/enterprise#123734
Belgian annual statement XBRL exports now preserve required true/false and unit values instead of translating them when the user language is Dutch. This prevents affected filings from being rejected by the National Bank of Belgium validator.
Original PR description
Steps to reproduce: - Set the user language to Dutch. - Go to Accounting > Reporting > Annual Statements. - Generate the XBRL export for a report other than the "company, abridged" (acon) balance…
Steps to reproduce:
- Set the user language to Dutch.
- Go to Accounting > Reporting > Annual Statements.
- Generate the XBRL export for a report other than the "company,
abridged" (acon) balance sheet/P&L combination, e.g. an association
(asso_a/asso_f) or "company, full"/"company, capital" report.
- Open the file: the `<met:bln1>` boolean facts are exported as
"onwaar" instead of "false", which is not a valid XBRL boolean
lexical value and gets rejected by the NBB validator.
Cause of the issue:
QWeb templates translate static text nodes by default. The base
module ships a generic `msgid "false" -> msgstr "onwaar"` translation,
used elsewhere in the UI, which silently hijacks the literal
"false"/"true" and unit tokens ("iso4217:EUR", "pure") in the XBRL
data templates whenever the file is generated in Dutch.
Solution:
Add `t-translation="off"` on the `<met:bln1>` boolean facts and the
`<measure>` unit tokens in the 5 remaining XBRL templates,
so these fixed-vocabulary XBRL values are never subject to translation
opw-6395785
Forward-Port-Of: odoo/enterprise#124945Resetting a submitted tax return no longer changes the company-wide tax lock date, so closed periods are not unintentionally reopened for everyone. The update also supports companies that set the tax lock date before submitting a return, helping larger teams keep accounting periods controlled during VAT filing.
Original PR description
To reproduce the issue: 1) Initialize a company in Belgium, create the tax returns 2) Submit the VAT return from January 3) Open the lock date wizard. The tax lock date is January 31st. 4) Add a lock…
To reproduce the issue:
1) Initialize a company in Belgium, create the tax returns 2) Submit the VAT return from January
3) Open the lock date wizard. The tax lock date is January 31st. 4) Add a lock date exception removing the tax lock date just for you, for 5 min. 5) Reset January's return
6) Reopen the lock date wizard.
====> Your exception is still there, but the tax lock date for everyone has been reset to December 31st.
This is plain wrong. Resetting a return should not automatically reopen the period for everyone. Lock dates exceptions/modifications are anyway required to reset the return ; they should pilot the whole flow. Nothing being magically hidden from the user means there can't be someone else mistakenly encoding something into the reopened period.
Another fix was required to make this one work: setting the tax lock date before submitting the return should work. In bigger environments, users might want to do that as a first step to reduce the number of people encoding data before actually doing the submission of the return. Therefore, the case where the tax lock date is already set at the date_to of the return when submitting it was supposed to be already supported, and allow the creation of the closing entry for that return, despite it being on the tax lock date. The test ensuring this was however badly written, and the feature didn't work: the closing was created at a later date than the lock date automatically, due to the Bills' Algorithm.
Forward-Port-Of: odoo/enterprise#124872
Forward-Port-Of: odoo/enterprise#124811VoIP call recordings made from Apple mobile devices will no longer produce silent audio files. The recording settings were adjusted for Apple browsers so businesses can reliably review recorded calls when call recording is enabled.
Original PR description
Before this commit, recording a VoIP phone call from an Apple mobile device generated a silent audio file. This issue happened because the configured 8000 `audioBitsPerSecond` value was too low. Apple mobile browsers strictly respect this value, while other browsers ignore it and default to a higher bitrate to 128000. Increasing `audioBitsPerSecond` to 32000 on WebKit browsers fixes the issue on Apple mobile devices. How to reproduce: - Set up a DIDWW user. - Enable call recording. - Make a call. - Open the call and play the recording. opw-6046534 Forward-Port-Of: odoo/enterprise#124433 Forward-Port-Of: odoo/enterprise#117885
Fixed an issue where the payroll dashboard could crash after users dismissed the final warning on an empty dashboard. The screen now handles upcoming pay run dates correctly, allowing payroll teams to continue using the dashboard without interruption.
Original PR description
Steps to reproduce:- 1. Set schedule on payroll dashboard. 2. Dismiss every warning. 3. On dismissing last warning throws a traceback. Root cause:- `DashboardEmptyScreen` passed the raw closing_date value straight from the RPC response into formatDateLabel, which calls date.diff(...) assuming a Luxon DateTime. The RPC layer serializes it as a plain ISO string, so formatDateLabel crashed with "date.diff is not a function" any time the empty-dashboard screen rendered with upcoming pay runs. Fix:- added new method `formatClosingDate` to format `closingDate` seperately. task-6395553
Barcode delivery operations now correctly warn users when the same package is scanned more than once, even when multiple packages are part of the transfer. This prevents duplicated package contents from being processed and avoids incorrect negative stock quantities.
Original PR description
Steps to reproduce --- 1. Enable Packages and turn on "Move Entire Packages" on the delivery operation type. 2. Create a storable product P and add 2 units in different package in stock: 1 in…
Steps to reproduce --- 1. Enable Packages and turn on "Move Entire Packages" on the delivery operation type. 2. Create a storable product P and add 2 units in different package in stock: 1 in PACK001, 1 in PACK002 3. In the Barcode app > Operations > Delivery > New 4. Scan a first package PACK001, then a second different package PACK002 5. Scan the first package PACK001 again. Issue --- Re-scanning an already scanned package is meant to be rejected with a "This package is already scanned." warning, but the rejection stops working as soon as a second package is present in the transfer, so the package content gets added a second time and, once validated, the source quant goes negative (the package ends up holding a negative and a positive quant of the same product). Commit 23613c63947 added a canPackSomeLines flag that is set to true for every package line that is not the scanned one, so any other package in the transfer makes the alreadyDonePackId && !canPackSomeLines guard false and silently skips the warning. The scanned package already exposes whether it had something left to pack through scannedPackages, so gating the warning on that flag instead keeps the check working regardless of how many other packages are in the transfer. https://github.com/odoo/enterprise/blob/3cc1a162e61662814b0e52c0c720831952d208a8/stock_barcode/static/src/models/barcode_picking_model.js#L1976-L2006 opw-6279105 Forward-Port-Of: odoo/enterprise#125229 Forward-Port-Of: odoo/enterprise#121755
Delivery guides in Chilean localization no longer fail when a kit includes components measured differently from the kit product. The system now prices those component lines using their own product pricing, preventing unit conversion errors and allowing users to print delivery guides as expected.
Original PR description
When a kit is delivered, each component move is linked to the kit's sale order line. Pricing the delivery guide in "sale order" mode converted the component quantity into the kit's sale UoM. For a component sold in a different UoM category than the kit, this cross-category conversion raises a UserError. Steps to reproduce: - Create a BoM for a kit product with a component in a different UoM category - Create a customer with Delivery Guide Price = "From Sale Order" - Sold the kit in a sale order and deliver it - On the delivery, print the delivery guide -> error This fix makes the guide price for a component move to be "product" if the component's product is different from the related sale line product, avoiding the cross-category UoM conversion. opw-6327895 Forward-Port-Of: odoo/enterprise#125199 Forward-Port-Of: odoo/enterprise#122776
Product managers can now use barcode lookup to automatically fill product details without needing full administrator access. This keeps product creation workflows efficient while avoiding unnecessary elevation of user permissions.
Original PR description
Currently when a user with a product manager rights that is not admin tries to look up the product with barcode information is not auto filled. ## Steps to replicate: - Install stock with demo data -…
Currently when a user with a product manager rights that is not admin tries to look up the product with barcode information is not auto filled. ## Steps to replicate: - Install stock with demo data - Barcode Database > Setup barcode lookup credentials - Users > Marc Demo > Give Marc Demo > Master Data > Products > Create - Login as `Marc Demo` - Products > Barcode: `850049670180` > Click anywhere else ## Observed Behaviour: Information on the product template is not autofilled, as it would be when using a System Admin user(Mitchell Admin). ## Root cause: This issue occurs because barcode lookup is gated behind a check for System Admin rights. Although users in the Product Manager group have permission to create products, they do not satisfy this condition, so the barcode lookup never executes at [1]. [1]- https://github.com/odoo/enterprise/blob/c66995fda83e19b28a38312af8efdc1601881cf0/product_barcodelookup/models/product_template.py#L17-L22 ## Why this is an issue: The original restriction (task [2] and commit [3]) was intended to limit barcode lookup to users who can create products, preventing unnecessary API calls. This was a valid assumption in 17.3-18.0, where creating products in POS required System Admin rights but now after commit [4] this is no longer the case. In v18, task [5] introduced the Product Manager group, making product creation independent of System Admin rights or module rights. Later, v18.3 exposed these Master Data access rights to non-debug users through commit [6]. As a result, there are users who are legitimately responsible for product creation and maintenance (regardless of POS usage) they can no longer use barcode lookup unless they are also granted full System Admin privileges, which provides broader access than required. ## Solution: Remove the group-based permission check so that access is determined solely by product edit permissions. This ensures that only users with the ability to modify products can use the API call, preserving the original security intent. As a result, users no longer need unnecessary administrative privileges toperform barcode lookups. [2]: https://www.odoo.com/odoo/project/49/tasks/3911024 [3]: https://github.com/odoo/enterprise/commit/444df3e48cb8d479d3b5d4a03a4bfefa48650910 [4]: https://github.com/odoo/odoo/commit/821bbc4504fd80a508e2412c7490ee60dd03f7b8 [5]: https://github.com/odoo/odoo/commit/d4886faf12ccaf63d5e899c20df2543d1ce046ab [6]: https://github.com/odoo/odoo/commit/e74eaf628498155243db73ea229eaf5e74c24f2a opw-6290999 Forward-Port-Of: odoo/enterprise#121915
Fixes an issue where testing a bank statement CSV import could fail because temporary records from the trial run were no longer available. This helps users validate bank statement imports reliably before applying them.
Original PR description
odoo/odoo#255059 made execute_import's savepoint flushing, so a dryrun rollback now properly invalidates the ORM cache instead of leaving it. That exposed a pre-existing bug here: we created the statement with line_ids pointing at .line records dryrun had already rolled back, raising "Record does not exist or has been deleted". To fix this issue we run as dryrun as False to allow the execute_import's savepoint do the work and rollbacked in finally. Steps to reproduce: - Just import a account.bank.statement.line OPW-6410352 Forward-Port-Of: odoo/enterprise#125389
Fixed an issue where importing a Chilean electronic tax document file containing multiple documents could put all invoice lines and references onto the first vendor bill. Each document is now handled separately, helping avoid incorrect bill totals and reconciliation problems.
Original PR description
When importing an EnvioDTE XML containing several DTEs (journal upload or incoming DTE mail server), one vendor bill is created per DTE, but the first bill receives the invoice lines and references…
When importing an EnvioDTE XML containing several DTEs (journal upload or incoming DTE mail server), one vendor bill is created per DTE, but the first bill receives the invoice lines and references of ALL the DTEs in the file, causing the total amount mismatch.
Cause: `_split_xml_into_new_attachments()` creates new attachments for the documents beyond the first one but leaves the original `file_data['xml_tree']` untouched; the decoder must scope itself to the first document (as l10n_it_edi and l10n_es_edi_facturae do), which `_l10n_cl_import_dte()` never did.
e.g. l10n_es_edi_facturae:633:
```python
# Only decode the first invoice of the Factura-e file.
tree = tree.xpath('//Invoice')[0]
```
Fix: scope the tree to the first DTE node before filling the bill. Kept behind a `len > 1` guard so files with a bare <DTE> root (matched by `xpath('//ns0:DTE')` but not by `findall('.//ns0:DTE')`) keep working.
Introduced in: https://github.com/odoo/enterprise/pull/75327.
opw-6378954
Forward-Port-Of: odoo/enterprise#124691This fix ensures Colombian city postal codes with fewer digits are formatted correctly before being sent to the Envia delivery service. It helps prevent delivery failures for affected Colombian locations such as Antioquia, improving reliability for shipments to and from those cities.
Original PR description
Issue ----- Delivery does not always work from/to some cities in Colombia, like Antioquia. Cause ----- There was an oversight in fix 7654c55 where only 5 digit postal codes taken from the colombian…
Issue ----- Delivery does not always work from/to some cities in Colombia, like Antioquia. Cause ----- There was an oversight in fix 7654c55 where only 5 digit postal codes taken from the colombian localisation were padded in https://github.com/odoo/enterprise/blob/390acf532e8932fd9b9a708382a5e36cdbb35754/delivery_envia/models/envia_request.py#L726-L727 However, some of the colombian cities listed in `l10n_co_edi/data/res.city.csv` have 4 digit codes (like `SANTA FÉ DE ANTIOQUIA`, code `5042`). https://github.com/odoo/enterprise/blob/7cceddaf086d849b8e2121e1023ef3479397534f/l10n_co_edi/data/res.city.csv#L12 These 4 digit codes have to be right-padded to 5 characters before the left-padding to match the official colombian zip codes. See colombian gov official document (PDF download) where the code is actually `05042`. https://www.dane.gov.co/files/censo2005/provincias/subregiones.pdf ----- Ticket: opw-6248252 Forward-Port-Of: odoo/enterprise#123344 Forward-Port-Of: odoo/enterprise#120164
Applying engineering change orders with attached documents now uses the correct attachment reference, preventing errors during the Apply Changes step. This helps manufacturing and PLM users complete product revision updates reliably when documents are involved.
Original PR description
When applying an ECO, `action_apply` copies each ECO document onto the product template and fills `origin_attachment_id` with `attach.id`. That field is a many2one to `ir.attachment`, but `attach` is a `product.document`. Steps to reproduce: - Create an `mrp.eco` record and start a new revision - Upload a document on the ECO, note its product.document id - Make sure no ir.attachment exists with that same id - Move the ECO to its final stage and hit "Apply Changes" - Observe the error The very same change was already applied on master by 3a39186f883, but was never backported. opw-6387343 Forward-Port-Of: odoo/enterprise#124950
The employee Documents button now correctly counts and opens signed contract documents, even when they are linked through employee contract versions. This helps HR users reliably find completed employee contract paperwork from the employee record.
Original PR description
[FIX] documents_{hr|sign}: employee docs button for signed contracts Bug reproduction: 1 - In saas-19.4, install documents_hr and hr_contract_salary with demo data 2 - As Mitchell Admin, go to…
[FIX] documents_{hr|sign}: employee docs button for signed contracts
Bug reproduction:
1 - In saas-19.4, install documents_hr and hr_contract_salary with demo data
2 - As Mitchell Admin, go to Employees, open one, click on "Offers - New"
3 - Select employee_contract.pdf as PDF Template
4 - Use the button "Salary configurator" to fill in the configurator, review it and sign it.
5 - Go back to the backend, find the contract in Sign and sign it.
6 - Go back to the Employee form view, the Documents stat button shows 0 document when it should be 1.
7 - Click the stat button and you see 0 documents in Documents when there should be one.
Bug cause:
1 - The document is created for the employee in documents app
but smart button cannot open those
2 - The res_model of the documents.document is hr.version for signed doc
-> it is not hr.employee
3 - In current implementation:
3.1 -> only hr.employee's documents appear after that smart button
Bug solution:
1 - _compute_document_count is reimplemented:
-> to count also documents with res_model as hr.version
2 - override _get_documents_domain:
-> to add version domain as an alternative with OR
-> to get documents with res_model='hr.version'
Test:
1 - Unit test is added
2 - Create documents with the archived versions of the employee
-> and observe the document count of the employee
Note:
-> Also, we changed the final document name in documents of the employee
task-6373620
Forward-Port-Of: odoo/enterprise#123763Account reports opened from the VAT return check screen no longer fail after a browser refresh. This prevents users from losing access to the report view due to missing page information in the refreshed URL.
Original PR description
Opening an account report through the VAT return button on an account.return.check record returns an inline client action whose report_id only exists in context. On refresh, Odoo will throw an error because it will try to rebuild the action context based off of the URL which is deficient. This will not effect reports opened via the menu since those follow a different pathway. This fix anchors the inline action to the "path" property stored on the client action. A helper method was added for deriving the action_id from a given report. opw-6366964 Forward-Port-Of: odoo/enterprise#125246 Forward-Port-Of: odoo/enterprise#124560
12 changes
Resolved issues and error corrections
Malaysia Statement of Account PDFs now calculate total and overdue amounts using the selected statement date. This keeps the totals aligned with the balances shown in the report, improving accuracy for backdated customer account reviews.
Original PR description
## Current behavior: In Malaysia's Statement of Account, the total and total overdue amounts dont consider the selected Statement Date, and will calculate all the balances up until today in the generated PDF report ## Expected behavior: The total and total overdue amounts should only sum the balances included in the report up until the selected Statement Date ## Steps to reproduce: 1. Install l10n_my_reports module, switch to Malaysian company 2. Go inside Invoicing > Report > Aged receivable 3. Select a specific date in the past 4. Observe that the total amounts dont match with the balance column, and wont change regardless of the date selected ## Cause of the issue: The template used o.total_overdue which ignores the report domain and statement date ## Fix: Accumulate overdue_total in the template loop with the same domain and date_to cutoff as the balance lines, so it always matches the displayed Balance lines for the selected Statement Date opw-6332970
This fixes how Peruvian addresses are formatted in electronic invoices so they match SUNAT's current UBL 2.1 requirements. It helps invoices pass official validation by correctly structuring district and urban subdivision information.
Original PR description
Update electronic invoicing address nodes to align with current SUNAT requirements. This transitions the geographic data formatting from the legacy UBL 2.0 schema to the standard UBL 2.1 specification, ensuring proper structural validation for districts and urban subdivisions. Documentation used: https://cpe.sunat.gob.pe/sites/default/files/inline-files/guia+xml+factura+version+2-1+1+0+(2)_0+(2).pdf opw-6282314
This fix prevents Odoo from automatically selecting a package from a different storage location when counting inventory by barcode. It helps avoid validation errors and keeps inventory counts aligned with the location that was actually scanned.
Original PR description
Steps to reproduce --- 1. Enable Storage Locations, Lots & Serial Numbers and Packages. 2. Put a lot of a product inside a package located in Section 2. 3. In the Barcode app, start an inventory…
Steps to reproduce --- 1. Enable Storage Locations, Lots & Serial Numbers and Packages. 2. Put a lot of a product inside a package located in Section 2. 3. In the Barcode app, start an inventory count, scan Section 1, then scan the product and the lot (without scanning the package). 4. Odoo fills the package from Section 2 on the Section 1 count line; validating fails because the same package cannot be in two locations. Issue --- When a product/lot is scanned, _processBarcode prefills package_id from a matching quant, but the location it passes to the lookup at https://github.com/odoo/enterprise/blob/c30ca22971fb1418f08c5543c646497ffdebbd13/stock_barcode/static/src/models/barcode_model.js#L1506-L1507 is read only from the current line, which does not exist yet while a new line is being created, so locationId is false. With no location, getQuants takes the branch at https://github.com/odoo/enterprise/blob/c30ca22971fb1418f08c5543c646497ffdebbd13/stock_barcode/static/src/lazy_barcode_cache.js#L151-L155 that collects quants across every location, so the lot's quant stored in another location is matched and its package is copied onto the count line. opw-6273909
Customers can no longer pay for planning-based rental services when the required resource is already booked. The cart now checks planning availability before payment, helping avoid failed orders and post-payment issues.
Original PR description
**Problem:** On a website with rental planning enabled, a customer can book a planning-backed rental product through eCommerce even when no planning resource is free for the requested window. The…
**Problem:** On a website with rental planning enabled, a customer can book a planning-backed rental product through eCommerce even when no planning resource is free for the requested window. The cart lets them increase the quantity past the available capacity and proceed all the way through checkout without any availability gate. **Steps to reproduce:** 1. Install `website_sale_renting_planning`. 2. Create a planning role with `sync_shift_rental` and one resource. 3. Create a service product with `rent_ok=True`, `planning_enabled=True` and the role above. 4. Pre-book the resource for some window via a `planning.slot`. 5. From eCommerce, add the product to the cart for the same window. 6. Proceed to checkout/payment. **Current behavior:** The cart is considered ready, no warning is shown, and payment can proceed even though no planning resource is free for the chosen period. **Expected behavior:** The cart should be flagged as not ready and pre-payment validation should refuse to confirm until the customer picks a different date or quantity. **Cause of the issue:** `sale.order._available_dates_for_renting` in `website_sale_renting` is the documented hook for "stock availability" gating of the cart and pre-payment flow (called from `_is_cart_ready` and from `_check_cart_is_ready_to_be_paid`). `website_sale_stock_renting` overrides it to apply a per-line stock check, but `website_sale_renting_planning` has no such override, so planning-backed rental services reach payment with no availability gate at all. **Fix:** Apply the same gating pattern that `website_sale_stock_renting` already uses: override `_available_dates_for_renting` in `website_sale_renting_planning` so that, for each rental line whose product is a planning-synced rentable service, the cart is only considered valid when at least the requested quantity of planning resources is free during the rental window (mirroring the resource and leave filtering already done by `_planning_slot_vals_list_per_sol` at SO confirmation time). This puts the gate at the same point the stock-renting flow enforces it, keeping the public cart/checkout flow consistent across rentable product types. opw-6247034
Sales users without Project permissions can now add products from the catalog on quotations without encountering an access error. The change prevents the system from checking project-related information unless the user has the required rights, reducing disruption in the sales workflow.
Original PR description
A user without Project rights cannot add a product from the catalog on a sale order Steps to reproduce: 1. Install industry_fsm_sale module 2. Go to Settings > Users & Companies > Users and open user Marc Demo 3. Set Field Service and Project rights to No 4. Log in as Marc Demo 5. Go to Sales and open any quotation 6. Click on Catalog in the order lines 7. An access error is raised Issue: industry_fsm_sale overrides `action_add_from_catalog` and tries to read sale.order.tasks_ids but users can't always access this field as it requires Project rights Solution: Check that the user has Project rights before trying to read tasks_ids opw-6315647
Users with manufacturing access but limited sales permissions can now update manufacturing orders linked to rental sales without being blocked by sales order access rules. This prevents unnecessary access errors and keeps production work moving while preserving sales document restrictions.
Original PR description
### Steps to reproduce: - Ensure `sale_stock_renting` is installed - Enable Multi-Steps Routes > Unarchive MTO - Create a product P with a BoM and the routes MTO + manufacture - Create anc confirm a…
### Steps to reproduce: - Ensure `sale_stock_renting` is installed - Enable Multi-Steps Routes > Unarchive MTO - Create a product P with a BoM and the routes MTO + manufacture - Create anc confirm a sale order for A unit of P - Log in with an other user with with mrp User rights and sales User: Own Documents Only (he should not have access to the SO) - Open the MO, add a component line and save #### > Access Error: Blame the following rule: - Personal Order ### Cause of the issue: Writing on the `move_raw_ids` will trigger a call of the `_autoconfirm_production` in order to confirm the newly created move: https://github.com/odoo/odoo/blob/e447f4849056a0aab35966fb6ba595ebaadb79ab/addons/mrp/models/mrp_production.py#L990-L991 https://github.com/odoo/odoo/blob/e447f4849056a0aab35966fb6ba595ebaadb79ab/addons/mrp/models/mrp_production.py#L1422-L1423 During this confirmation process, one calls the `_merge_moves` method in order to merge this new move (if relevant) to any already existing one. https://github.com/odoo/odoo/blob/e447f4849056a0aab35966fb6ba595ebaadb79ab/addons/stock/models/stock_move.py#L1575-L1576 Now, the issue is that, `sale_stock_renting` module overrides the method `_prepare_merge_moves_distinct_fields` determining the fields relevant to the merge by requiring a read access to the `is_rental_order` compute field of the `sale_order` linked to the MO: https://github.com/odoo/enterprise/blob/b66097122ba3a758734ac6fb2b26579c35cb72c2/sale_stock_renting/models/stock_move.py#L34-L40 However, due to the 'Personal Orders' ir.rule, the user does not have a read access to this record: https://github.com/odoo/odoo/blob/e447f4849056a0aab35966fb6ba595ebaadb79ab/addons/sale/security/ir_rules.xml#L44-L49 Community: https://github.com/odoo/odoo/pull/271017 opw-6275658 Forward-Port-Of: odoo/enterprise#121510 Forward-Port-Of: odoo/enterprise#121135
Fixed an issue where importing a Chilean electronic document file with multiple documents could incorrectly combine all invoice lines and references into the first vendor bill. Each document is now handled separately, helping prevent amount mismatches and incorrect vendor bill data.
Original PR description
When importing an EnvioDTE XML containing several DTEs (journal upload or incoming DTE mail server), one vendor bill is created per DTE, but the first bill receives the invoice lines and references…
When importing an EnvioDTE XML containing several DTEs (journal upload or incoming DTE mail server), one vendor bill is created per DTE, but the first bill receives the invoice lines and references of ALL the DTEs in the file, causing the total amount mismatch.
Cause: `_split_xml_into_new_attachments()` creates new attachments for the documents beyond the first one but leaves the original `file_data['xml_tree']` untouched; the decoder must scope itself to the first document (as l10n_it_edi and l10n_es_edi_facturae do), which `_l10n_cl_import_dte()` never did.
e.g. l10n_es_edi_facturae:633:
```python
# Only decode the first invoice of the Factura-e file.
tree = tree.xpath('//Invoice')[0]
```
Fix: scope the tree to the first DTE node before filling the bill. Kept behind a `len > 1` guard so files with a bare <DTE> root (matched by `xpath('//ns0:DTE')` but not by `findall('.//ns0:DTE')`) keep working.
Introduced in: https://github.com/odoo/enterprise/pull/75327.
opw-6378954
Forward-Port-Of: odoo/enterprise#124691Fixes an error that could appear when editing analytic distribution information on employee records with analytic accounting enabled. The change stops tracking a field type that the system cannot safely track, improving stability for payroll accounting users.
Original PR description
This commit partially reverts [1] To reproduce the issue: 1. Enable analytic accounting 2. Try to edit the analytic distribution field on an Employee Error: a traceback appears Commit [1] makes a JSON field tracked, which is forbidden: https://github.com/odoo/odoo/blob/2aa35eb9c7a709126dca65e81ca6e823706fbb19/addons/mail/models/mail_tracking_value.py#L172 We cancel the tracking part of [1] so the production versions will follow the code on master: the field `analytic_distribution` will be both whitelisted and untracked, as done by [2]. [1] https://github.com/odoo/enterprise/commit/88a3e70bba20c2d508f8970d31ce6ee7afd11ee4 [2] https://github.com/odoo/enterprise/commit/55bec464e3861d5023f7e78588142ddc22d500d8 opw-6405122 opw-6416523 opw-6412398 opw-6411399 opw-...
This update prevents an error that could occur when multiple equity transactions were processed at the same time. It improves reliability for users working with cap tables and equity transaction records.
Original PR description
When the ``_compute_security_price`` method is called on multiple records, a traceback will appear. Traceback: ```py ValueError: Expected singleton: equity.transaction(1, 2) ``` https://github.com/odoo/enterprise/blob/314a79b774f30dc9377b2971492576c4b84483e1/equity/models/equity_transaction.py#L218 The method filters newly created records using ``self._origin.id``. Since ``self`` is the whole recordset, accessing ``self._origin.id`` on multiple records raises a singleton error. sentry-7626410485
Deleting a middle quality check in a manufacturing work order now keeps the remaining checks properly connected. This prevents later quality checks from disappearing on the shop floor, helping operators continue inspections without missing required steps.
Original PR description
Steps to reproduce the bug: - Create a BOM for product P1 with one work order WO1 - Create 3 quality points linked to WO1 via the `operation_id` field - Confirm a manufacturing order for P1: - 3…
Steps to reproduce the bug:
- Create a BOM for product P1 with one work order WO1
- Create 3 quality points linked to WO1 via the `operation_id` field
- Confirm a manufacturing order for P1:
- 3 quality checks A → B → C are generated
- Open the shop floor for the work order:
- Observe that all 3 quality checks are displayed
- Delete quality check B (the middle one)
- come back to the shop floor for the work order:
- Observe that quality check C is no longer displayed in the shop floor
Problem:
After deleting check B, check C disappeared from the shop floor. Quality checks are stored as a doubly-linked list via the `next_check_id` and `previous_check_id` fields on `quality.check`. The shop floor JS (`mrp_display_record.js`) traverses this list starting from the check with no `previous_check_id`, then follows `next_check_id` until the chain ends. When check B was deleted, it nullified the FK references pointing to it, leaving check A with `next_check_id = False` and check C with `previous_check_id = False`. The traversal from A therefore stopped immediately, and C was never reached.
No `unlink` override existed on `quality.check` to repair the chain before deletion.
Solution:
Added an `unlink` override that, before deleting each check, reconnects its predecessor and successor: if the deleted check has both a previous and a next, `prev.next_check_id` is set to `next` and `next.previous_check_id` is set to `prev`, preserving a valid chain for the remaining checks.
opw-6369298This fixes an issue where Avalara tax fields could disappear on customer or vendor contacts in Canada when using a US company setup. Businesses using Avalara can now see and maintain the correct tax codes, partner codes, and exemption details for affected contacts.
Original PR description
**Steps to reproduce:**
- Install Accounting and account_avatax
- Use a US company (by default)
- Create a contact with Canada as country
**Issue:**
In "Sales & Purchase" tab, all the fields from avatax module are not displayed (i.e. "Avalara Code", "Avalara Partner Code", "Avalara Exemption").
**Cause:**
The `invisible` property of those fields is using `fiscal_country_codes` char field.
If no company is set on the record, `fiscal_country_codes` will contain the country code of the selected companies in addition to the country code of the record.
In this case, the value of `fiscal_country_codes` will be `US,CA` string, which triggers `fiscal_country_codes not in ('US', 'CA')` invisible condition.
opw-6328395
Forward-Port-Of: odoo/enterprise#124619Trash cleanup now skips deleted document records whose attachments are still needed by signed documents. This prevents the automated cleanup job from failing and helps keep the database trash clearing normally for all users.
Original PR description
### Before this PR sign.document.attachment_id is an ondelete='restrict' foreign key. When a trashed documents.document shares its attachment with a sign.document, the trash autovacuum _gc_clear_bin unlinks the document, cascades to the ir.attachment, and hits that constraint: ``` update or delete on table "ir_attachment" violates foreign key constraint "sign_document_attachment_id_fkey" on table "sign_document" ``` The autovacuum aborts on the first such record, so the trash stops being cleared for every user on the database. The existing override already skips documents whose res_model is sign.request or sign.document. It misses the shared-attachment case: a document can hold that attachment while its own res_model stays empty or points elsewhere, so the res_model filter never catches it. ### After this PR No error raised during garbage collector because trashed attachment linked to a sign.document are not catched by garbage collector
5 changes
New functionality added to Odoo
Adds a new certified FedEx delivery module to support FedEx certification requirements and updated API behavior. This helps businesses use FedEx shipping in Odoo with changes aligned to FedEx guidelines and room for future FedEx options without database restructuring.
Original PR description
For the certification process of FedEx there were some changes needed in the delivery_fedex_rest module. This modules made those changes according to the FedEx guidelines. Task-id: 6164275
Resolved issues and error corrections
This fixes incorrect balance amounts shown in Mexican electronic payment documents when payments, credit notes, and exchange rate differences were reconciled together. The change keeps reconciliations in the right chronological order so fully paid invoices are reported accurately for compliance and customer records.
Original PR description
### Issue: Attributes of DoctoRelacionado node in the XML display an incorrect value because the exchange rate difference entry distorts the calculation, even though the invoice was fully settled. https://drive.google.com/file/d/1ntQny0o8bkkfYtY5ZNBK0Yq7Rq0I-yfz/view ### Fix: Sorting partials by "not exchange_move_id" first broke the chronological order whenever the invoice/payment partial itself carried an exchange difference (e.g. a foreign currency payment settled at another rate). This made the residual-chain algorithm consume the credit note's "other_residual" on the wrong payment, so ImpSaldoAnt/ImpPagado/ ImpSaldoInsoluto in the payment CFDI's DoctoRelacionado stayed wrong even though the invoice was fully paid. Populate the exchange move mapping in a separate first pass and sort the partials purely by date/id, so credit notes are always deducted from the correct payment. task-id:[6363092](https://www.odoo.com/odoo/project/49/tasks/6363092)
Fixed an issue where Avalara-related fields could be hidden when creating or editing Canadian contacts under a US company setup. This ensures users can correctly enter Avalara codes and exemption details for supported countries.
Original PR description
**Steps to reproduce:**
- Install Accounting and account_avatax
- Use a US company (by default)
- Create a contact with Canada as country
**Issue:**
In "Sales & Purchase" tab, all the fields from avatax module are not displayed (i.e. "Avalara Code", "Avalara Partner Code", "Avalara Exemption").
**Cause:**
The `invisible` property of those fields is using `fiscal_country_codes` char field.
If no company is set on the record, `fiscal_country_codes` will contain the country code of the selected companies in addition to the country code of the record.
In this case, the value of `fiscal_country_codes` will be `US,CA` string, which triggers `fiscal_country_codes not in ('US', 'CA')` invisible condition.
opw-6328395Spanish VAT record book exports now include taxable accounting entries that are not tied to standard invoices or bills, such as entries created when closing Point of Sale sessions. This helps businesses produce more complete VAT records and avoid missing reportable sales activity in Excel exports.
Original PR description
Currently, the Spanish VAT record books (Libros Registro de IVA) only include move types associated with invoices and bills. However, miscellaneous entries (type 'entry'), such as those generated by the Point of Sale session closures or manual liquidations, also carry tax obligations and must be reflected in these reports. Steps to reproduce: - Open a POS Session - Create an order, pay and close session - Go to Accouting > Reporting > Tax report - Select Generic Tax report - Print "VAT record Books" Issue: Only invoices and bills are visible in the excel file, and not the entry generated from point of sale. However, movements that are not related to invoices should be included in the VAT books. opw-5862529 Forward-Port-Of: odoo/enterprise#113681
The Mexican electronic invoicing process now avoids reprocessing recently updated invoices, preventing repeated background job loops. This improves reliability and reduces unnecessary system workload when checking invoice status with SAT.
Original PR description
Fixing the SAT cron in https://github.com/odoo/enterprise/pull/123213 we did not think it through it could cause infinite cron triggering. The write_date is updated on every record that is handled, so we can just not handle the invoices that have been updated in the last 4 hours, so when the cron is retriggered, it will not handle the same thing again. We can also use the notify_progress instead of just retriggering.