Daily updates from Odoo
Tuesday, October 29, 2024
18 changes · master
Enhancements to existing features
This update adjusts how WhatsApp-related screens are connected to the underlying Odoo interface so they remain compatible with recent layout changes. It is a minor maintenance improvement that helps keep the WhatsApp feature working reliably without changing business workflows.
This update improves explanatory notes in the code for mail-related features, making future maintenance easier for developers. It does not change how users interact with the system, but supports ongoing work on email-like chatter flows.
Original PR description
Just fixing / improving some docstrings while passing by. Part of Task-4273479 : [mail] Email-like chatter flow
Code cleanup and technical improvements
This update tidies the internal structure of several files by reordering imports and removing outdated header annotations. It does not change business behavior, but helps keep the codebase easier to maintain and align with current Odoo standards.
Original PR description
- Reordering and cleaning imports; - Removing encoding declaration; - Removing javascript module annotations (optional since commit Odoo/odoo@5f2c505836002ac7851c29c28d612f721d467bc4); Community PR: - https://github.com/odoo/odoo/pull/185347
Miscellaneous changes
**Steps to reproduce:** - Install Accounting - Go to Accounting settings - Disable "Checks" option (A warning pops up infoming that "account_check_printing" module will be uninstalled) - Save **Issue:** A traceback is raised because it tries to access some fields that are defined in "account_check_printing" module. **Cause:** After uninstallation of "account_check_printing" module, the settings page is reloaded. However, this reload is performed with an old version of the env where
Original PR description
**Steps to reproduce:** - Install Accounting - Go to Accounting settings - Disable "Checks" option (A warning pops up infoming that "account_check_printing" module will be uninstalled) - Save…
**Steps to reproduce:** - Install Accounting - Go to Accounting settings - Disable "Checks" option (A warning pops up infoming that "account_check_printing" module will be uninstalled) - Save **Issue:** A traceback is raised because it tries to access some fields that are defined in "account_check_printing" module. **Cause:** After uninstallation of "account_check_printing" module, the settings page is reloaded. However, this reload is performed with an old version of the env where the fields defined in the uninstalled module are still there. It's coming from an override of "execute" method of "res.config.settings" defined in Accounting module. This override is checking if "sign_invoice" field is enable in order to install Sign module. This action is performed after the "execute" on "super()". If the "execute" is uninstalling a module, the "env" is reset as some models or fields may not be present anymore. However, in the override of the "execute" method, the old "env" is still used and non-existent fields are prefetched. **Solution:** Check to install Sign module in the override of "execute" method before executing the one from "super()" to prevent using an expired "env". opw-4251932 Forward-Port-Of: odoo/enterprise#72227
Context: an AccessError is raised while running test `TestAccountMove.test_add_followers_on_post` and having `l10n_pe_edi_pos` installed: ``` odoo.exceptions.AccessError: You are not allowed to access 'Point of Sale Orders' (pos.order) records. This operation is allowed for the following groups: - Inventory/User - Point of Sale/User Contact your administrator to request access if necessary. ``` Reason: commit 3045807f9a318fed810095fc5746c0e7bbdb0063 extended the `_post` method
Original PR description
Context: an AccessError is raised while running test `TestAccountMove.test_add_followers_on_post` and having `l10n_pe_edi_pos` installed: ``` odoo.exceptions.AccessError: You are not allowed to access 'Point of Sale Orders' (pos.order) records. This operation is allowed for the following groups: - Inventory/User - Point of Sale/User Contact your administrator to request access if necessary. ``` Reason: commit 3045807f9a318fed810095fc5746c0e7bbdb0063 extended the `_post` method on `account.move`, and is reading the field `pos_order_ids`. But one may post an invoice without having sufficient security groups to access `pos.order` records (Inventory/User, Point of Sale/User). runbot-102743 Forward-Port-Of: odoo/enterprise#72547 Forward-Port-Of: odoo/enterprise#72467
To reproduce the issue: 1) Set a prefix group threshold of 2000 on the Generic Balance Sheet 2) Modify the groupby of the Receivable line of that report so that it does account_id,id 3) Duplicate the report ; modify the duplicate to: - Make it a variant of the Generic BS - Set its prefix group threshold to 3 4) Ensure at least 3 move lines exist in the same period for the Receivable account 5) Open the Balance Sheet. By default, the Generic one will be shown 6) Switch to the duplica
Original PR description
To reproduce the issue: 1) Set a prefix group threshold of 2000 on the Generic Balance Sheet 2) Modify the groupby of the Receivable line of that report so that it does account_id,id 3) Duplicate the…
To reproduce the issue:
1) Set a prefix group threshold of 2000 on the Generic Balance Sheet 2) Modify the groupby of the Receivable line of that report so that it does account_id,id 3) Duplicate the report ; modify the duplicate to:
- Make it a variant of the Generic BS
- Set its prefix group threshold to 3 4) Ensure at least 3 move lines exist in the same period for the Receivable account 5) Open the Balance Sheet. By default, the Generic one will be shown 6) Switch to the duplicate you made in 3).
7) Unfold both levels of the Receivable line.
====> Prefix groups aren't used, while the number of move lines reaches the threshold value.
This happens because the variant is opened from the Generic BS. So, options have first been generated and kept in the session for the Generic BS. When openin the variant, it receives the previously generated options as previous_options, and restores the threshold originally defined on the Generic BS.
We don't want to restore the threshold for previous options, so we just remove that code and now always initialize it to the value contained in the apporpriate field when computing the options.
Forward-Port-Of: odoo/enterprise#72938
Forward-Port-Of: odoo/enterprise#72822Purpose ======= If there is already a user for a given employee (including a trigram for instance), we should avoid erasing it to the value the employee encodes on the salary configurator. Forward-Port-Of: odoo/enterprise#72799
Original PR description
Purpose ======= If there is already a user for a given employee (including a trigram for instance), we should avoid erasing it to the value the employee encodes on the salary configurator. Forward-Port-Of: odoo/enterprise#72799
In this commit we try to clean some ambiguity to improve the code readability. Forward-Port-Of: odoo/enterprise#70628
Original PR description
In this commit we try to clean some ambiguity to improve the code readability. Forward-Port-Of: odoo/enterprise#70628
**Steps to reproduce:** - Install account_loans - Go to Settings - Disable "Import & Export" option - Save **Issue:** The db is not accessible anymore because of the following error: ``` The following modules are needed by other modules but have not been defined, they may not be present in the correct asset bundle: - @base_import/import_action/import_action - @base_import/import_model The following modules could not be loaded because they have unmet dependencies, this is a secon
Original PR description
**Steps to reproduce:** - Install account_loans - Go to Settings - Disable "Import & Export" option - Save **Issue:** The db is not accessible anymore because of the following error: ``` The following modules are needed by other modules but have not been defined, they may not be present in the correct asset bundle: - @base_import/import_action/import_action - @base_import/import_model The following modules could not be loaded because they have unmet dependencies, this is a secondary error which is likely caused by one of the above problems: - @account_loans/components/loans/import_action ``` **Cause:** When "Import & Export" option is disabled, "base_import" module and many others are unsintalled because they depend on "base_import" module. "account_loans" is not uninstalled but it should be because it depends on "base_import" module as it extends its "ImportAction" component. opw-4283944 Forward-Port-Of: odoo/enterprise#72874
Issue: Mail scanners can send HTTP HEAD requests to links contained in emails, which can change the state of a sign request without user action. Steps: - send a sign request - look in mailhog to get the notification mail - copy the link at the bottom of the mail and `curl --head <url>` - the sign request is now ignored opw-4217355 Forward-Port-Of: odoo/enterprise#72852 Forward-Port-Of: odoo/enterprise#72182
Original PR description
Issue: Mail scanners can send HTTP HEAD requests to links contained in emails, which can change the state of a sign request without user action. Steps: - send a sign request - look in mailhog to get the notification mail - copy the link at the bottom of the mail and `curl --head <url>` - the sign request is now ignored opw-4217355 Forward-Port-Of: odoo/enterprise#72852 Forward-Port-Of: odoo/enterprise#72182
Before this commit when dragging a sign item, the initial copy wasn't invisible completely. For example placeholder, dragging arrow were still visible. This commit aims to fix the issue by setting visibility of sign_item_body to be same as parent. Task: 4195899 Forward-Port-Of: odoo/enterprise#72782 Forward-Port-Of: odoo/enterprise#70276
Original PR description
Before this commit when dragging a sign item, the initial copy wasn't invisible completely. For example placeholder, dragging arrow were still visible. This commit aims to fix the issue by setting visibility of sign_item_body to be same as parent. Task: 4195899 Forward-Port-Of: odoo/enterprise#72782 Forward-Port-Of: odoo/enterprise#70276
Before this commit: - Creating a GST return period with a quarterly periodicity without selecting a quarter will raise a traceback. - Creating a GST return period with a monthly periodicity without selecting a month will raise a traceback. Reason: - While calculating the start_date and end_date of the quarterly return period: `period_start = fields.Date.context_today(self).replace(day=1, month=int(record.month), year=int(record.year))` If there is no month, then int(record.month) will
Original PR description
Before this commit: - Creating a GST return period with a quarterly periodicity without selecting a quarter will raise a traceback. - Creating a GST return period with a monthly periodicity without…
Before this commit: - Creating a GST return period with a quarterly periodicity without selecting a quarter will raise a traceback. - Creating a GST return period with a monthly periodicity without selecting a month will raise a traceback. Reason: - While calculating the start_date and end_date of the quarterly return period: `period_start = fields.Date.context_today(self).replace(day=1, month=int(record.month), year=int(record.year))` If there is no month, then int(record.month) will return 0 and The month should be between 1 and 12, so it will raise an error. - While calculating the start_date and end_date of the monthly return period: `period_start = fields.Date.context_today(self).replace(day=1, month=int(record.quarter), year=int(record.year))` If there is no quarter, then int(record.quarter) will return 0 and The month should be between 1 and 12, so it will raise an error. After this commit: - The start_date and end_date will not be calculated if a month or quarter is not defined for the monthly or quarterly return periods. Traceback - https://pastebin.com/LyKUDrH5 Task-4243468 Forward-Port-Of: odoo/enterprise#72815 Forward-Port-Of: odoo/enterprise#71883
Forward-Port-Of: odoo/enterprise#72090
Original PR description
Forward-Port-Of: odoo/enterprise#72090
When the date in the modify wizard for assets is changed, the residual_value should be updated to give a better view to the user. As this value is changed, the tests had to be changed accordingly. The gain or loss account is now correctly adapted from the computed value (itself computed on the date) and the Asset Counterpart Account is hidden if there is no gain. task-3981380 Forward-Port-Of: odoo/enterprise#72504 Forward-Port-Of: odoo/enterprise#70277
Original PR description
When the date in the modify wizard for assets is changed, the residual_value should be updated to give a better view to the user. As this value is changed, the tests had to be changed accordingly. The gain or loss account is now correctly adapted from the computed value (itself computed on the date) and the Asset Counterpart Account is hidden if there is no gain. task-3981380 Forward-Port-Of: odoo/enterprise#72504 Forward-Port-Of: odoo/enterprise#70277
We want to keep the two columns layout when there is no transaction yet. Task-id: 4150010 Forward-Port-Of: odoo/enterprise#72418
Original PR description
We want to keep the two columns layout when there is no transaction yet. Task-id: 4150010 Forward-Port-Of: odoo/enterprise#72418
## [FIX] project_enterprise: avoid creating employee in test Before this commit, `:TestSmartSchedule.test_multi_users_tasks` test in `project_enterprise` module creates 2 employees but the problem is `hr` module is not in the dependencies of `project_enterprise` and so that test fails when `hr` is not installed. This commit adapts the test to make sure to not create any employees inside that test. ## [FIX] project_enterprise_hr: adds test_smart_schedule test Before this commit, t
Original PR description
## [FIX] project_enterprise: avoid creating employee in test Before this commit, `:TestSmartSchedule.test_multi_users_tasks` test in `project_enterprise` module creates 2 employees but the problem is `hr` module is not in the dependencies of `project_enterprise` and so that test fails when `hr` is not installed. This commit adapts the test to make sure to not create any employees inside that test. ## [FIX] project_enterprise_hr: adds test_smart_schedule test Before this commit, the `test_multi_users_tasks` test defined in `/project_enterprise:TestSmartSchedule` failed when `hr` module is not installed since that test create 2 employees. This commit moves the test in `project_enterprise_hr` to make sure the test works as expected and we can create employee since `hr` is in the dependencies of `project_enterprise_hr` module. runbot-76567 Forward-Port-Of: odoo/enterprise#72414
**Steps to reproduce:** - Install l10n_mx_reports - Switch to a Mexican company (e.g. ESCUELA KEMPER URGATE) - Go to "Accounting / Reporting / Audit Reports / Trial Balance" - Download "COA SAT (XML)" - Validate the xml on an online SAT document validator (e.g. https://ceportalvalidacionprod.clouda.sat.gob.mx/) **Issue:** The validation fails because "Sello" attribute is invalid. **Cause:** A wrong XSLT is used to generate the digital stamp for COA SAT (XML). opw-4209089 Forward
Original PR description
**Steps to reproduce:** - Install l10n_mx_reports - Switch to a Mexican company (e.g. ESCUELA KEMPER URGATE) - Go to "Accounting / Reporting / Audit Reports / Trial Balance" - Download "COA SAT (XML)" - Validate the xml on an online SAT document validator (e.g. https://ceportalvalidacionprod.clouda.sat.gob.mx/) **Issue:** The validation fails because "Sello" attribute is invalid. **Cause:** A wrong XSLT is used to generate the digital stamp for COA SAT (XML). opw-4209089 Forward-Port-Of: odoo/enterprise#72882
Before this commit currently when creating a new app using Studio the previous button icon in the navbar appears in the wrong direction After this commit The previous button icon should appear in the right direction Task - 3845561 Forward-Port-Of: odoo/enterprise#72674 Forward-Port-Of: odoo/enterprise#61835
Original PR description
Before this commit currently when creating a new app using Studio the previous button icon in the navbar appears in the wrong direction After this commit The previous button icon should appear in the right direction Task - 3845561 Forward-Port-Of: odoo/enterprise#72674 Forward-Port-Of: odoo/enterprise#61835