Daily updates from Odoo
Monday, June 12, 2023
20 changes · master
Resolved issues and error corrections
When a form field is made read-only in Studio, Odoo now also ensures its value is still saved. This restores earlier behavior and helps prevent data from being lost or ignored after Studio customizations.
Original PR description
In form view, when "readonly" is set to true on a field, it should also set the "force_save" attribute to true. This commit adds this behaviour that was present in legacy and adds a test. Task: [3284910](https://www.odoo.com/mail/view?model=project.task&res_id=3284910&access_token=1e9b0d2e-0712-472c-8db8-f86e7f6287e9) Related to https://github.com/odoo/enterprise/pull/41783 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
Code cleanup and technical improvements
The Documents app was updated to remove an outdated internal service that is no longer needed. This does not introduce a new user-facing feature, but it helps keep the app simpler and easier to maintain for future improvements.
Original PR description
Part of task-3265211 https://github.com/odoo/odoo/pull/124495
Documentation and clarification updates
The Enterprise license link in General Settings now sends users to the public Odoo legal documentation instead of a private GitHub page. This prevents customers or users without repository access from seeing a 404 error when they try to view the license terms.
Original PR description
before this commit, if user clicks on the "Odoo Enterprise Edition License V1.0" in the general settings page, it redirects the user to the odoo enterprise github license page [1] but this page can only be accessed by the person who has access to the odoo enterprise repository, for others it will show 404 after this commit, on clicking the license link it will redirect to the public page: https://www.odoo.com/documentation/master/legal/licenses.html [1] https://github.com/odoo/enterprise/blob/master/LICENSE
Miscellaneous changes
Issue: Customer was experiencing long loading times when loading the balance sheet(more than 30 seconds). Solution: Change the formula for the Voorgaande Jaren Winst report line to use the prefixes of account codes instead of Odoo domains. Improved run time from over 30 seconds to about 8 seconds on the customer's database. opw-3285505 Forward-Port-Of: odoo/enterprise#42139
Original PR description
Issue: Customer was experiencing long loading times when loading the balance sheet(more than 30 seconds). Solution: Change the formula for the Voorgaande Jaren Winst report line to use the prefixes of account codes instead of Odoo domains. Improved run time from over 30 seconds to about 8 seconds on the customer's database. opw-3285505 Forward-Port-Of: odoo/enterprise#42139
At present, Odoo offers limited article templates. In order to expand the template gallery, our plan is to convert all existing demo articles into article templates. This way, users will be able to access and utilize the templates even if they haven't imported the demo data into their database. Additionally, this approach avoids cluttering the user's workspace with demo articles. task-3302324 Forward-Port-Of: odoo/enterprise#41720
Original PR description
At present, Odoo offers limited article templates. In order to expand the template gallery, our plan is to convert all existing demo articles into article templates. This way, users will be able to access and utilize the templates even if they haven't imported the demo data into their database. Additionally, this approach avoids cluttering the user's workspace with demo articles. task-3302324 Forward-Port-Of: odoo/enterprise#41720
[FIX] account_reports: bank reconciliation report: properly display warning when there is a balance hole in the statements chain To reproduce: - Create a bank statement with one line of 42€. Starting balance is 0, end balance is hence 42. - Create another statement at a later date with a line of 11€, but giving it a starting balance of 52. End balance is 63. - Open the bank reconciliation report at a date >= to the second statement's. ==> The report should display a warning telling the
Original PR description
[FIX] account_reports: bank reconciliation report: properly display warning when there is a balance hole in the statements chain To reproduce: - Create a bank statement with one line of 42€. Starting balance is 0, end balance is hence 42. - Create another statement at a later date with a line of 11€, but giving it a starting balance of 52. End balance is 63. - Open the bank reconciliation report at a date >= to the second statement's. ==> The report should display a warning telling the statements chain has a hole. It did not because of the wrong field being called. [IMP] account_reports: bank reconciliation report: add a test checking the 'misc entry' warning's generation Forward-Port-Of: odoo/enterprise#42298 Forward-Port-Of: odoo/enterprise#42223
[[ADD] l10n_pe_reports: Welcome PLE reports](https://github.com/odoo/enterprise/pull/26715/commits/5f593fb27963498c5c6b8173263387ec6b9da218) Reports supported: - Sales 14.1 - Purchase 8.1 - Purchase 8.2 Based on the SUNAT documentation: https://emprender.sunat.gob.pe/sites/default/files/inline-files/estructuras_ple_ultimo_03_05_2021.xls Forward-Port-Of: odoo/enterprise#42332 Forward-Port-Of: odoo/enterprise#37382
Original PR description
[[ADD] l10n_pe_reports: Welcome PLE reports](https://github.com/odoo/enterprise/pull/26715/commits/5f593fb27963498c5c6b8173263387ec6b9da218) Reports supported: - Sales 14.1 - Purchase 8.1 - Purchase 8.2 Based on the SUNAT documentation: https://emprender.sunat.gob.pe/sites/default/files/inline-files/estructuras_ple_ultimo_03_05_2021.xls Forward-Port-Of: odoo/enterprise#42332 Forward-Port-Of: odoo/enterprise#37382
Before this commit, the upgrade of a db to 16.2+ could fail because `<label for="date_deadline"/>` in the arch of a `project.task` form view is removed when `industry_fsm` module is installed. Moreover, when Project app is installed, the recurring bouton is always next to `date_deadline` field instead of being next to `planned_date_end` when `project_enterprise` module is installed. This commit reviews the arch to move the recurring bouton next to `planned_date_end` field when `project_enterp
Original PR description
Before this commit, the upgrade of a db to 16.2+ could fail because `<label for="date_deadline"/>` in the arch of a `project.task` form view is removed when `industry_fsm` module is installed. Moreover, when Project app is installed, the recurring bouton is always next to `date_deadline` field instead of being next to `planned_date_end` when `project_enterprise` module is installed. This commit reviews the arch to move the recurring bouton next to `planned_date_end` field when `project_enterprise` instead of doing it only when `industry_fsm` module is installed. And this commit avoid doing any replace instead we will use `attributes` to alter `attrs` and `move` to move the `date_deadline` in the right place instead of removing it and reintroduce it where we want. Forward-Port-Of: odoo/enterprise#42230 Forward-Port-Of: odoo/enterprise#42173
Previously, we gave the exported data to the action_download_spreadsheet action, and we created a new model based on the data. This was a problem for data that was only exported for the xlsx in UI plugins, because this wasn't in the exported data. Fixed by giving the model to the action_download_spreadsheet action instead of the data. Odoo task [3231170](https://www.odoo.com/web#id=3231170&menu_id=4720&cids=1&action=333&active_id=2328&model=project.task&view_type=form) Forward-Port-Of: od
Original PR description
Previously, we gave the exported data to the action_download_spreadsheet action, and we created a new model based on the data. This was a problem for data that was only exported for the xlsx in UI plugins, because this wasn't in the exported data. Fixed by giving the model to the action_download_spreadsheet action instead of the data. Odoo task [3231170](https://www.odoo.com/web#id=3231170&menu_id=4720&cids=1&action=333&active_id=2328&model=project.task&view_type=form) Forward-Port-Of: odoo/enterprise#42276 Forward-Port-Of: odoo/enterprise#38133
Steps to reproduce: - Install `data_cleaning` module - Go to Data Cleaning app -> Configuration -> Field Cleaning - Create a new rule: - Model: `Product` - Field: `Name` - Action: `Set Type Case` - Case: `All Uppercase` - Save and click on `Clean` button Issue: Traceback is raised Cause: Trying to apply the action (in this case `UPPER` in SQL) to a JSONB field while waiting for a char. This is due because since 16.0, the translation system
Original PR description
Steps to reproduce:
- Install `data_cleaning` module
- Go to Data Cleaning app -> Configuration -> Field Cleaning
- Create a new rule:
- Model: `Product`
- Field: `Name`
- Action: `Set Type Case`
- Case: `All Uppercase`
- Save and click on `Clean` button
Issue:
Traceback is raised
Cause:
Trying to apply the action (in this case `UPPER` in SQL) to a JSONB
field while waiting for a char. This is due because since 16.0, the
translation system has changed, and now the translation is directly in
the field as JSONB.
Solution:
Check if the field is a JSONB field and if so, check for the value
in the JSONB with the language of the current user.
opw-3278024
Forward-Port-Of: odoo/enterprise#40958This commit prevent using reversed moves to calculate the transaction values. taskid: 3346754 Forward-Port-Of: odoo/enterprise#42187 Forward-Port-Of: odoo/enterprise#41882
Original PR description
This commit prevent using reversed moves to calculate the transaction values. taskid: 3346754 Forward-Port-Of: odoo/enterprise#42187 Forward-Port-Of: odoo/enterprise#41882
taskid: 3274915 Forward-Port-Of: odoo/enterprise#42185 Forward-Port-Of: odoo/enterprise#40811
Original PR description
taskid: 3274915 Forward-Port-Of: odoo/enterprise#42185 Forward-Port-Of: odoo/enterprise#40811
Include external structures into social security certificate by excluding specifically undesired ones instead of including specifically desired ones. Forward-Port-Of: odoo/enterprise#42260
Original PR description
Include external structures into social security certificate by excluding specifically undesired ones instead of including specifically desired ones. Forward-Port-Of: odoo/enterprise#42260
Steps to reproduce the bug: - Install `social_push_notifications` module - Enable website push notifications in settings - In an other browser, go to the website as visitor and allow notifications (ensured focused tab is on Odoo website and browser is not minified) - Go back to main broswer and create a new post: - Set no `domain` (to match all visitors, for test purpose) - Set a title - Select main website to post on - Publish the post Issue: Notification not
Original PR description
Steps to reproduce the bug:
- Install `social_push_notifications` module
- Enable website push notifications in settings
- In an other browser, go to the website as visitor and allow notifications (ensured focused tab is on Odoo website and browser is not minified)
- Go back to main broswer and create a new post:
- Set no `domain` (to match all visitors, for test purpose)
- Set a title - Select main website to post on
- Publish the post
Issue:
Notification not received.
Cause:
Not handling foreground push notification.
Solution:
For foreground notification, use `messaging().onMessage` methode of
firebase and show notification (same behavior as backend notification).
More info : https://rnfirebase.io/messaging/usage
opw-3170544
Forward-Port-Of: odoo/enterprise#40739This information is only for banks, and shouldn't be displayed on the other journal types. Task id #3338971 Forward-Port-Of: odoo/enterprise#42095 Forward-Port-Of: odoo/enterprise#41608
Original PR description
This information is only for banks, and shouldn't be displayed on the other journal types. Task id #3338971 Forward-Port-Of: odoo/enterprise#42095 Forward-Port-Of: odoo/enterprise#41608
Purpose ======= The API 10.0 will be deprecated on Jun 08, 2023, and so we upgrade to the latest version. Task-3337765 Forward-Port-Of: odoo/enterprise#42243 Forward-Port-Of: odoo/enterprise#41394
Original PR description
Purpose ======= The API 10.0 will be deprecated on Jun 08, 2023, and so we upgrade to the latest version. Task-3337765 Forward-Port-Of: odoo/enterprise#42243 Forward-Port-Of: odoo/enterprise#41394
Steps to reproduce the bug: - Create a storable product “P1” - create a MO to produce one unit of “P1”: - be sure that no workorder is set - Confirm the MO - Add any analytic account - Try to mark done the MO Problem: Traceback is triggered, the “_create_analytic_entry” function is called without any “mrp.workcentre.productivity”: https://github.com/odoo/enterprise/blob/d4f65146dacf0c9c27577ce0965fe1589d548171/mrp_workorder_hr_account/models/mrp_workorder.py#L15-L16 Solution: In cases
Original PR description
Steps to reproduce the bug: - Create a storable product “P1” - create a MO to produce one unit of “P1”: - be sure that no workorder is set - Confirm the MO - Add any analytic account - Try to mark done the MO Problem: Traceback is triggered, the “_create_analytic_entry” function is called without any “mrp.workcentre.productivity”: https://github.com/odoo/enterprise/blob/d4f65146dacf0c9c27577ce0965fe1589d548171/mrp_workorder_hr_account/models/mrp_workorder.py#L15-L16 Solution: In cases where there are multiple work orders with time_ids, we would have a traceback due to the "ensure_one", so it is better to make the "_create_analytic_entry” function multi opw-3346372 Forward-Port-Of: odoo/enterprise#42262
Following recent changes from framework, button labels are not capitalized anymore, and the two "RETURN" & "PICKUP" buttons now stand out and should be corrected. Forward-Port-Of: odoo/enterprise#42269
Original PR description
Following recent changes from framework, button labels are not capitalized anymore, and the two "RETURN" & "PICKUP" buttons now stand out and should be corrected. Forward-Port-Of: odoo/enterprise#42269
This commit removes a test that was not well formatted and would not be launched by the test modules, since it used a cross_module feature and the test was not located inside the correct module. To facilitate the transition we are removing the defective test and adapting an existing one that did a similar kind of test. Now the behavior is correctly tested and its test is inside a correct module. task-3358027 Forward-Port-Of: odoo/enterprise#42176 Forward-Port-Of: odoo/enterprise#42145
Original PR description
This commit removes a test that was not well formatted and would not be launched by the test modules, since it used a cross_module feature and the test was not located inside the correct module. To facilitate the transition we are removing the defective test and adapting an existing one that did a similar kind of test. Now the behavior is correctly tested and its test is inside a correct module. task-3358027 Forward-Port-Of: odoo/enterprise#42176 Forward-Port-Of: odoo/enterprise#42145
In the balance sheet assets should be equal to liabilities + Equity which is not the behaviour we get now. Steps to reproduce the error : 1- Swiss Localization 2- Have any sort of profit/loss for the year 3- Go to Accounting/reporting/Balance sheet The error was happening because the formula for calculating CH_290_B which is "Previous year's unallocated profit or loss" isn't right ( relative to the correct one on 15.0) Task link: www.odoo.com/web#id=3172329&model=project.task opw-31
Original PR description
In the balance sheet assets should be equal to liabilities + Equity which is not the behaviour we get now. Steps to reproduce the error : 1- Swiss Localization 2- Have any sort of profit/loss for the year 3- Go to Accounting/reporting/Balance sheet The error was happening because the formula for calculating CH_290_B which is "Previous year's unallocated profit or loss" isn't right ( relative to the correct one on 15.0) Task link: www.odoo.com/web#id=3172329&model=project.task opw-3172329 Forward-Port-Of: odoo/enterprise#39385