Daily updates from Odoo
Navigate
Branch
Monday, June 12, 2023
26 changes
Security fixes and vulnerability patches
This update tightens how access permissions are handled in several Enterprise apps by removing broad, global access rules and relying on more specific permissions. This helps ensure users only access the records they are meant to use, especially around Chilean invoicing, eBay sales, payroll contracts, and Studio configuration.
Original PR description
Enterprise part of odoo/odoo#118701
New functionality added to Odoo
A new bridge module connects time off Gantt planning with employee contract information. This helps non-working days display correctly when schedules differ by contract, improving consistency with calendar behavior.
Original PR description
This commit adds an additional module to make the bridge between the hr_holidays_gantt and the hr_contract modules as the non-working days display might vary according to different contracts. This change has been made in order to be consistent with the changes made for the calendar in community in the hr_contract module. task-3060722
Resolved issues and error corrections
Planned hours on sales order lines now include planning slots without an assigned resource and refresh correctly after demo data or allocation changes. This gives sales and project teams more reliable planned workload and billing-related figures, while still excluding material resources where appropriate.
Original PR description
**[FIX] planning: fix _compute_planning_hours_planned** Before this commit: - sale_planning module: 1- When a planning slot doesn't have a resource (resource_id = False), its allocated_hours is not…
**[FIX] planning: fix _compute_planning_hours_planned**
Before this commit:
- sale_planning module:
1- When a planning slot doesn't have a resource (resource_id = False),
its allocated_hours is not counted when computing planning_hours_planned
of its sale_line_id.
2- The value of planning_hours_planned is wrong after installing
the demo data, the allocated hours of the last added planning_slot
are missing in the sum.
- project_timesheet_forecast_sale module:
When _compute_planning_hours_planned was inherited, the check on the material
resource was not taken into account
After this commit:
- sale_planning module:
1- the bug is fixed,
technically: the where part of the query was changed from
```
WHERE resource_id" in
(
SELECT id
FROM resource_resource
WHERE resource_type != 'material'
OR "resource_resource"."resource_type" IS NULL
)
```
to
```
WHERE resource_id IS NULL
OR resource_id" in
(
SELECT id
FROM resource_resource
WHERE resource_type != 'material'
OR "resource_resource"."resource_type" IS NULL
)
```
2- Technically, the problem is when _compute_allocated_hours is called for
the planning slots linked to the concerned sale_line_id, the compute method
that should be called to compute planning_hours_planned after each modification
in the value of the allocated_hours field is not called so we have a wrong value.
So, in this commit, an add_to_compute is added to force that compute.
- project_timesheet_forecast_sale:
The same previous condition was added to the query to filter by material
resources.
task-3299506When 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
The French balance sheet now keeps its totals balanced while showing the current year profit or loss in the right line. Prior-year earnings are also separated more accurately, reducing the risk of confusing financial report figures.
Original PR description
The aim of this PR is to ensure that the Balance Sheet is always balanced while ensuring that the Résultat de l'exercice line shows the total from the Profit & Loss report. We also introduce tests ensuring this behaviour. Task 3060790
Access to Belgian payroll reports is now made more consistent for users working outside Belgian companies. The change prevents most entry points, such as menus and quick search, from opening reports that should not be available, reducing confusion and accidental access errors.
Original PR description
Previously to restrict users from accessing belgian reports from a non-belgian company we used default_get with a check on the company. This works, but only when the user actually tries to create a record, so from a user's perspective, sometimes he can go into a tree view before getting the access error and sometimes he can't even click on the menu in the navbar. This commit tries to unify the experience from the most common access points to the actions: menu and CTRL+K search bar. It is still possible to land in the action if you go there from a Belgian company, then log into a non-belgian company, this is why the default_get checks stay in the code for now, as I couldn't find a better solution. task 3344749
Features or functions removed from Odoo
Swiss ISR payment documents have been removed because they have been replaced by the Swiss QR Bill. This keeps invoice payment handling aligned with current Swiss payment standards while preserving shared references still needed by QR Bill functionality.
Original PR description
In Switzerland, an ISR payment file was to be added to an invoice. This file has since been replaced with the QR Bill: https://www.pikon.com/en/blog/everything-you-need-to-know-about-the-swiss-qr-bill/ Removed its usage, while keeping the references that the QR Bill still uses. task-3040400
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