Thursday, May 8, 2025
16 changes · master
Features or functions removed from Odoo
This cleanup removes an obsolete delay setting that is no longer used after a related platform update. It reduces maintenance overhead without changing customer-facing behavior.
Original PR description
In this commit we remove checkDelay from codebase because it is no longer used since https://github.com/odoo/odoo/pull/194508 has been merged.
Code cleanup and technical improvements
Asset draft entries are now processed through the scheduled job rather than being triggered directly. This aligns the process with normal background handling and helps ensure tests reflect how the system runs in production.
Original PR description
Instead of calling the method directly, use the cron to run it. Since the CRON job can commit, we need to run in test mode. odoo/odoo#199092
Miscellaneous changes
See also: odoo/odoo#208257 Forward-Port-Of: odoo/enterprise#84595
Original PR description
See also: odoo/odoo#208257 Forward-Port-Of: odoo/enterprise#84595
This check got removed by https://github.com/odoo/enterprise/commit/1f66777dc25e55f53338efb7314bb8de69c995a0 , then mistakenly reintroduced by https://github.com/odoo/enterprise/commit/6d53412ed12082d9bd55032def36892401d4b262 Forward-Port-Of: odoo/enterprise#84535
Original PR description
This check got removed by https://github.com/odoo/enterprise/commit/1f66777dc25e55f53338efb7314bb8de69c995a0 , then mistakenly reintroduced by https://github.com/odoo/enterprise/commit/6d53412ed12082d9bd55032def36892401d4b262 Forward-Port-Of: odoo/enterprise#84535
Forward-Port-Of: odoo/enterprise#84509 Forward-Port-Of: odoo/enterprise#80561
Original PR description
Forward-Port-Of: odoo/enterprise#84509 Forward-Port-Of: odoo/enterprise#80561
Version: - saas-17.4 Steps to reproduce: - Create request signature activity for sign request. - Try to send document for sign from activity. Issue: - It will give a traceback to user. Cause: - It will try to create a record for 'sign.request' model and in reference_doc field it was showing wrong value as we are not allowing to create reference_doc for 'sign.request' model. Solution: - Since reference_doc is not supported for 'sign.request', this fix adds a condition to explici
Original PR description
Version: - saas-17.4 Steps to reproduce: - Create request signature activity for sign request. - Try to send document for sign from activity. Issue: - It will give a traceback to user. Cause: - It will try to create a record for 'sign.request' model and in reference_doc field it was showing wrong value as we are not allowing to create reference_doc for 'sign.request' model. Solution: - Since reference_doc is not supported for 'sign.request', this fix adds a condition to explicitly skip setting it for that model task-4416253 Forward-Port-Of: odoo/enterprise#84729 Forward-Port-Of: odoo/enterprise#75611
If you have a company A that has a journal set up with bank synchronization, and a company B that is a branch of company A, you have access to the journal and the bank synchronization (account.online.link) of company A in company B. This causes an issue when fetching the transactions from the context of company B, as that will create the fetched transactions with a `company_id` set to B, which will cascade on the journal entries and items linked to these transactions. To ensure the correct
Original PR description
If you have a company A that has a journal set up with bank synchronization, and a company B that is a branch of company A, you have access to the journal and the bank synchronization…
If you have a company A that has a journal set up with bank synchronization, and a company B that is a branch of company A, you have access to the journal and the bank synchronization (account.online.link) of company A in company B. This causes an issue when fetching the transactions from the context of company B, as that will create the fetched transactions with a `company_id` set to B, which will cascade on the journal entries and items linked to these transactions. To ensure the correct company is set on the transactions, we force the company in the context when creating them. As a result: - When only company A is selected, transactions are correctly created in company A. - When both company are selected, no matter if the transactions are fetched from A or B, the transactions are correctly created in company A. - When only company B is selected, the user is faced with an access error, as Odoo is trying to open a view with the fecthed transaction, which belong to company A. To prevent this access error, it was decided that the "Fetch Transaction" buttons should not appear when the company owning the bank synchronization is not selected. A new computed field was then introduced on the account.online.account to check if we should allow fetching given the currenctly selected companies. That field is also added on the account.online.link as a logical conjunction of its account.online.account values of the field. These fields are then used to decide whether if we show the transaction fetching buttons on the dashboard and on the online link form view. Another issue with branches is the 'connect bank' button. With the same configuration as above, let's have companies A and B enabled, with B as the selected company. If you connect a bank to a journal belonging to company A by clicking on the 'connect bank' button on the dashboard, it will successfully connect, but the account.online.link will belong to company B. Then, if you try to access the accounting dashboard with only company A enabled, you will be faced with an access error, as the journal from company A tries to diplay informations computed with the above account.online.link of company B. To prevent this, we only make the 'connect bank' button appear if company A (i.e. the company owning the journal) is selected as the active company. This did not require a new field, and was done by adding an entry in the dashboard data. opw-4515862 Forward-Port-Of: odoo/enterprise#84694 Forward-Port-Of: odoo/enterprise#83134
How to reproduce: - Select a Belgian company - Create an invoice for a EU country - Add a line with no product - Display the intrastat report for the invoice period - Export the xml The default sql query allows the selection of account move lines with no product to be able to trigger a warning. Those lines are then filtered out when displayed in the web interface. Those lines were not filtered out when getting data for file exports. An error would trigger rendering the xml as the weight
Original PR description
How to reproduce: - Select a Belgian company - Create an invoice for a EU country - Add a line with no product - Display the intrastat report for the invoice period - Export the xml The default sql query allows the selection of account move lines with no product to be able to trigger a warning. Those lines are then filtered out when displayed in the web interface. Those lines were not filtered out when getting data for file exports. An error would trigger rendering the xml as the weight would be None where an integer is required. This commit adds a condition to only select move lines with a product_id when querying data for a file. Task 4763185 See opw-4671512, opw-4735439, opw-4642781 Forward-Port-Of: odoo/enterprise#84635 Forward-Port-Of: odoo/enterprise#84517
The exception for the second trimester for 2024 has been redone for 2025. task-4734827 Forward-Port-Of: odoo/enterprise#84300 Forward-Port-Of: odoo/enterprise#84024
Original PR description
The exception for the second trimester for 2024 has been redone for 2025. task-4734827 Forward-Port-Of: odoo/enterprise#84300 Forward-Port-Of: odoo/enterprise#84024
### Issue: If `l10n_br_avatax` is installed, portal users are not able to view any products via the shop on a Website. An inherited field's domain requires access to the `city_id` from the Website's company's `res.partner` record, but Portal users cannot access this. This is only an issue on 18.2+, as this value was originally stored in the field cache due to a separate workflow in previous versions. Previously, opening a product would trigger `_compute_fiscal_position_id`, which would event
Original PR description
### Issue: If `l10n_br_avatax` is installed, portal users are not able to view any products via the shop on a Website. An inherited field's domain requires access to the `city_id` from the Website's…
### Issue: If `l10n_br_avatax` is installed, portal users are not able to view any products via the shop on a Website. An inherited field's domain requires access to the `city_id` from the Website's company's `res.partner` record, but Portal users cannot access this. This is only an issue on 18.2+, as this value was originally stored in the field cache due to a separate workflow in previous versions. Previously, opening a product would trigger `_compute_fiscal_position_id`, which would eventually call `_compute_address`. `_compute_address` contains a sudo, allowing the retrieval of the address fields (like `city_id`) and would store them in cache. The domain would be able to retrieve from the cache rather than needing to fetch the values. In 18.2, the `fiscal_position` workflow was refactored, and the address fields are no longer stored in cache for the domain `_l10n_br_property_service_code_origin_id_domain` to access prior to hitting any security limits. ### Solution: We should be safe to `sudo` the `city_id`, allowing the domain to complete. opw-4732256 Forward-Port-Of: odoo/enterprise#84140
A `CheckViolation` traceback occurs when uploading an XML file that lacks the `Nombre` attribute. **Steps to Reproduce:** - Install `l10n_mx_edi` module - Navigate to `Accounting>Vendors>bills` try to upload [this](https://drive.google.com/file/d/1DRON2ftkDhwASqy_OFi9FtUNj7tODyKm/view?usp=sharing) `[demo file]` **Error:** `CheckViolation: new row for relation 'res_partner' violates check constraint 'res_partner_check_name'` **Root Cause:** - The `Nombre` attribute in the XML file is
Original PR description
A `CheckViolation` traceback occurs when uploading an XML file that lacks the `Nombre` attribute. **Steps to Reproduce:** - Install `l10n_mx_edi` module - Navigate to `Accounting>Vendors>bills` try…
A `CheckViolation` traceback occurs when uploading an XML file that lacks the `Nombre` attribute. **Steps to Reproduce:** - Install `l10n_mx_edi` module - Navigate to `Accounting>Vendors>bills` try to upload [this](https://drive.google.com/file/d/1DRON2ftkDhwASqy_OFi9FtUNj7tODyKm/view?usp=sharing) `[demo file]` **Error:** `CheckViolation: new row for relation 'res_partner' violates check constraint 'res_partner_check_name'` **Root Cause:** - The `Nombre` attribute in the XML file is missing, which results in the `name` field being set to `None` at [1] in the `partner_vals` dictionary. [1]- https://github.com/odoo/enterprise/blob/1d06bf93a2be03e969a5fce134b7323a70b2aef1/l10n_mx_edi/models/account_move.py#L2504 - The `res.partner` model has a database constraint (**res_partner_check_name**) that requires the `name` field to be non-null. When attempting to create a `partner` with a None value for `name`, the database raises a **CheckViolation error**. **Solution:** - Added a check in the `_l10n_mx_edi_import_cfdi_fill_partner` method to handle cases where the `Nombre` attribute is missing. - This prevents the creation of a partner with an invalid `name` field and avoids the **CheckViolation error**. sentry- 6546905710 Forward-Port-Of: odoo/enterprise#83776
In GSTR-2B, while doing the matching for previous bills, we want to avoid The bills that are already reconciled and marked as partially matched or fully matched. Sometimes, it's possible that there can be more than one bill with the same The reference number and if any of them has been already reconciled then We want to avoid it again being reconciled in next return periods. opw-4744438 Forward-Port-Of: odoo/enterprise#84573 Forward-Port-Of: odoo/enterprise#84497
Original PR description
In GSTR-2B, while doing the matching for previous bills, we want to avoid The bills that are already reconciled and marked as partially matched or fully matched. Sometimes, it's possible that there can be more than one bill with the same The reference number and if any of them has been already reconciled then We want to avoid it again being reconciled in next return periods. opw-4744438 Forward-Port-Of: odoo/enterprise#84573 Forward-Port-Of: odoo/enterprise#84497
Following this commit : - Aggregator name is displayed on KOT i.e Ubereats,Zomato etc. - Since it is an online order, instead of Dine In/ Take out , Delivery/Online should be displayed. - Preparation time is also displayed. Community PR: https://github.com/odoo/odoo/pull/202003 task-4633156 Forward-Port-Of: odoo/enterprise#84671 Forward-Port-Of: odoo/enterprise#81559
Original PR description
Following this commit : - Aggregator name is displayed on KOT i.e Ubereats,Zomato etc. - Since it is an online order, instead of Dine In/ Take out , Delivery/Online should be displayed. - Preparation time is also displayed. Community PR: https://github.com/odoo/odoo/pull/202003 task-4633156 Forward-Port-Of: odoo/enterprise#84671 Forward-Port-Of: odoo/enterprise#81559
Apply the HSN schema based on the 'l10n_in_reports.hsn_new_schema_apply_date' system parameter. If the parameter is missing or invalid, default to 2025-05-01 as per government guidelines. Forward-Port-Of: odoo/enterprise#84825 Forward-Port-Of: odoo/enterprise#84745
Original PR description
Apply the HSN schema based on the 'l10n_in_reports.hsn_new_schema_apply_date' system parameter. If the parameter is missing or invalid, default to 2025-05-01 as per government guidelines. Forward-Port-Of: odoo/enterprise#84825 Forward-Port-Of: odoo/enterprise#84745
Steps to Reproduce: 1. Install industry_fsm_sale module. 2. Create a SO with at least one SOL. 3. Save the record. 4. Delete the line, then click the Catalog button without saving. Issue: - An error occurs indicating a missing record. Cause: - The action_add_from_catalog method is accessing self.task_id, but self still includes the deleted SOL, which no longer exists. As a result, accessing its fields raises an error. Fix: - Move the action_add_from_catalog method to the
Original PR description
Steps to Reproduce: 1. Install industry_fsm_sale module. 2. Create a SO with at least one SOL. 3. Save the record. 4. Delete the line, then click the Catalog button without saving. Issue: - An error occurs indicating a missing record. Cause: - The action_add_from_catalog method is accessing self.task_id, but self still includes the deleted SOL, which no longer exists. As a result, accessing its fields raises an error. Fix: - Move the action_add_from_catalog method to the sale.order model, which is the appropriate place to handle this logic, ensuring the method doesn't depend on potentially stale or deleted lines. opw-4760487 Forward-Port-Of: odoo/enterprise#84414
Commit https://github.com/odoo/enterprise/commit/66ec6f497d1adfdffae6840899d08c168f6ab63a links particular BE disallowed expense categories to accounts and makes a vehicle required when using those accounts. The dependencies of `l10n_be_account_disallowed_expenses_fleet` did not ensure the creation of the Belgian expense categories. Fix --- Add `l10n_be_disallowed_expenses` as a dependency of `l10n_be_account_disallowed_expenses_fleet` Solves Runbot-181948 Forward-Port-Of: odoo/enterpr
Original PR description
Commit https://github.com/odoo/enterprise/commit/66ec6f497d1adfdffae6840899d08c168f6ab63a links particular BE disallowed expense categories to accounts and makes a vehicle required when using those accounts. The dependencies of `l10n_be_account_disallowed_expenses_fleet` did not ensure the creation of the Belgian expense categories. Fix --- Add `l10n_be_disallowed_expenses` as a dependency of `l10n_be_account_disallowed_expenses_fleet` Solves Runbot-181948 Forward-Port-Of: odoo/enterprise#84282