Daily updates from Odoo
Saturday, November 29, 2025
7 changes · 19.0
Enhancements to existing features
This update brings Odoo's Swissdec ELM Certification in line with version 19.0, enhancing compliance with Swiss regulations. Key improvements include support for French-crossborder worker telework, adjustments to retirement regulations, and automated calculations for child and education allowances, ensuring accurate reporting.
Original PR description
This Pull request extends the Odoo Swissdec ELM Certification to the minor version 5.3. By doing so we add the following features : - Telework Percentage declaration for French-crossborder comuters - Adapting to AVS21 regulation, where retired employees can refuse their right to retirement - Adding automatic Child and education allowance calculation - Add the calculation of LPP in % - Allowing the specification of custom employer parts for LAAC and IJM Forward-Port-Of: odoo/enterprise#95518
This update streamlines accounting test creation by introducing a standardized helper for managing XML files. It simplifies saving, updating, and ignoring specific XML elements, reducing errors and improving test organization. This change enhances the reliability and maintainability of our accounting test suite.
Original PR description
> This is a backport of the merged https://github.com/odoo/odoo/pull/235565 - with a couple of improvements & adaptations to the test files. This commit adds helpers and improves on the way we assert…
> This is a backport of the merged https://github.com/odoo/odoo/pull/235565 - with a couple of improvements & adaptations to the test files. This commit adds helpers and improves on the way we assert XML files in `AccountTestInvoicingCommon` and all accounting test that extend from it. From now on, all accounting test code that assert an XML tree/string to an XML file should call the `assert_xml` helper, and design their test file name/location/etc. around this framework. This approach has a few major benefits: Assert / Save XML When testing XML files, we often need to perform create/read/update operations on the asserted XML to make sure it corresponds to the most updated/intended data. Previously, to save something to an XML, a developer would need to write their own local helpers to save the XML in the right directory. This was cumbersome and error-prone, so we decided to design a helper that allows developer to immediately save AND/OR update the asserted XML: to save/update an XML, we can simply add `SAVE_XML` as an additional test tags. Better test naming and optional subfolder management To better organize test files, the `assert_xml` method allows us to write just the test key name (without `.xml`), and the framework will automatically get the XML to assert/save from the `test_files` directory. An optional `subfolder` parameter is also added to allow writing to specific subfolder within `test_files`. Better `___ignore___` management in assertion XMLs Sometimes, we want to ignore a few XML node that are not relevant, or have content that are not deterministic (changes on every test run). To handle this, previously, developers would need to modify the assertion XML content by hand or write their own local script to do so. With this new framework, we just need to add an `ignore_schema.xml` file somewhere in the `test_files` directory. If put inside a subfolder, it will be applied with more priority towards the XML that are put on that specific subfolder. Save "pure" XML (before applying `___ignore___`) in temporary folder When calling `SAVE_XML`, before applying the ignore patches, the XML will be saved in a temporary folder (same folder as the screenshots for tours), so that developers can use them in external tests in the future, and for any other saving reasons. In addition, this commit also: - add `extra_tags` helper to save all the common tags for EDIs, for a better way to enable `EXTERNAL_MODE` testing inspired by `l10n_mx_edi` - convert some non-assert XML test helpers into a class method - canonicalize the XML to ensure consistency of the generated test files following the C14N Version 2 standard. (Deterministic namespaces location, sorted attributes, etc.) task-4891206 Forward-Port-Of: odoo/odoo#237435 Forward-Port-Of: odoo/odoo#237285
Resolved issues and error corrections
This update resolves an issue where Italian e-invoicing rejections weren't being properly recorded in Odoo. Now, when an invoice is rejected by the Italian system, the error message is correctly stored and displayed, ensuring accurate tracking and reporting for users. This improves the reliability of the Italian e-invoicing integration.
Original PR description
If an invoice sent through the Italian EDI gets rejected, a traceback appears:
```
`errors = '\n- '.join(error.get('errors', ''))
^^^^^^^^^
AttributeError: 'str' object has no attribute 'get'`
```
`moves_data[move]['error']` shouldn't be a string, as `_hook_if_errors()` expects a dictionary from this PR odoo/odoo#224267 on.
We restore the functionality by changing the error type.
Ticket [link](https://www.odoo.com/odoo/project.task/5271525)
opw-5271525This update resolves an issue where the DIOT report export failed when journal entries lacked a linked partner. The fix ensures the report generation process continues smoothly by explicitly handling entries without a partner, preventing errors and improving data accuracy. This ensures consistent reporting for all financial data.
Original PR description
**Steps to reproduce:** 1. Install `Accounting` and `l10n_mx_reports` modules. 2. Create two journal entries using DIOT tax grid: one with partner, one without 3. Confirm the entries. 4. Go to `Accounting → Reporting → Tax Report → DIOT (MX)`. 5. Try to print the DIOT report in TXT format from the top-right dropdown. **Observed behavior:** * Export fails with a traceback if any entry has no partner. **Root cause:** The method `_get_diot_values_per_partner` does not handle entries without partners. **Solution:** raise `Usererror` if entries without partners when sorting and exporting. note: The second commit addresses a traceback caused by a missing operation_type_code. This occurs when all entries lack a partner or when a partner’s operation_type_code field is not set. opw-5060825 Forward-Port-Of: odoo/enterprise#100843 Forward-Port-Of: odoo/enterprise#96529
A test case in the Enterprise accounting module was failing due to differences in payment state handling between the community and enterprise versions. This change moves the test case to the Enterprise module to ensure it accurately reflects the expected behavior, resolving the reported error.
Original PR description
Community build was failing with: ``` test_bill_state_change_on_payment_state self.assertEqual(payment.invoice_ids.payment_state, 'not_paid') AssertionError: 'paid' != 'not_paid' - paid + not_paid ``` [Commit](https://github.com/odoo/odoo/pull/234725/commits/5dc43a2156e5b176e3236583b45b4838a987ee7d) In community there is no any `in_payment` state for account move records. As on changing payment state to draft It stayed in the `paid` only. `in_payment` state introduced in the enterprise module. So the test case is failing for the community version. To fix this I've moved the test case to the enterprise to retain the expected behaviour. runbot error: 234453 Forward-Port-Of: odoo/enterprise#100865 Forward-Port-Of: odoo/enterprise#100834
A test case in the community version of Odoo's account module was failing due to a difference in payment state handling between the community and enterprise versions. This update moved the test case to the enterprise environment to ensure it accurately reflects the expected behavior, resolving the reported error.
Original PR description
Community build was failing with: ``` test_bill_state_change_on_payment_state self.assertEqual(payment.invoice_ids.payment_state, 'not_paid') AssertionError: 'paid' != 'not_paid' - paid + not_paid ``` [Commit](https://github.com/odoo/odoo/pull/234725/commits/5dc43a2156e5b176e3236583b45b4838a987ee7d) In community there is no any `in_payment` state for account move records. As on changing payment state to draft It stayed in the `paid` only. `in_payment` state introduced in the enterprise module. So the test case is failing for the community version. To fix this I've moved the test case to the enterprise to retain the expected behaviour. runbot error: 234453 Forward-Port-Of: odoo/odoo#237933 Forward-Port-Of: odoo/odoo#237881
This update optimizes the way the Point of Sale system handles attribute exclusions. Previously, the system checked every attribute for exclusion, which was slow. Now, the exclusion process is performed only once when the POS is loaded, resulting in a noticeable performance improvement. This change enhances the speed and responsiveness of the Point of Sale experience.
Original PR description
Before this commit, the computation of the exclusion of some attributes based on other selected was going through every attribute to determine if it was excluded or not. This is now done once at the loading of the pos. --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#216392 Forward-Port-Of: odoo/odoo#213789