Daily updates from Odoo
Wednesday, April 27, 2022
19 changes · master
Enhancements to existing features
This update reorganizes parts of the Approvals and Sign apps so their screens are backed by clearer internal view models. It should not change day-to-day behavior for users, but it helps the product team maintain and evolve these apps more reliably over time.
Original PR description
This commit introduces models that define records being 1:1 map with components, as a step to move further to having essentially all business code in models. Having code in models is desirable to have very maintainable code, thanks to robust and declarative code with an ORM-like architecture. Task-2831082 community: https://github.com/odoo/odoo/pull/89735
This update adjusts internal approval app test helpers so they match a newer mock server structure. It is a behind-the-scenes preparation that reduces future migration effort and should not change the user experience.
Original PR description
This PR helps reducing the noise in the discuss new env PR. Indeed, the new mockServer has the same method except that they are not prefixed by any underscore. All calls have been changed, and the corresponding methods created. They will be deleted later. task-2582313 community: https://github.com/odoo/odoo/pull/89659
A new debug-only menu option lets administrators request a fresh spreadsheet snapshot when a file is slow to load. This improves loading performance by clearing the current undo and redo history for that spreadsheet session.
Original PR description
The purpose of this commit is to add a menu item in the file menu (only visible in debug mode) in order to request a snapshot. Requesting a snapshot will imply to clear the revisions of the current session, so the history (undo/redo) will be lost, but loading time will be reduce. So this button should be used when a spreadsheet takes long time to load. In an ideal world, we should be able to clearly identify when a session should be closed (when there is no more active users).
The mail enterprise code now uses the newer “isSmall” naming instead of “isMobile” when adapting Discuss views to smaller screens. This is an internal cleanup that makes future Discuss improvements easier to integrate without changing visible behavior for users.
Original PR description
In order to reduce the noise in the new discuss env PR, all the messaging.device.isMobile occurences have been renamed to isSmall in order to match the new env terminology. task-2582313 community: https://github.com/odoo/odoo/pull/89655
Resolved issues and error corrections
This fixes an issue where contract signing plans still referenced an outdated employee field after plans were updated to support multiple employees. The change helps ensure the right employees are included when using HR contract signing workflows.
Original PR description
odoo/enterprise#24728 made plans available for multiple employees, but odoo/enterprise#25511 still used the old field name.
This fixes how exchange rate dates from the Turkish bank are read by using the correct month-first date format. It helps ensure currency rates are imported for the right dates, reducing accounting and reporting errors.
Users can now open the related records from pivot header formulas in Documents spreadsheets without encountering an error. This fixes a crash and makes spreadsheet analysis more reliable.
Original PR description
Before this commit, trying to open the records on a PIVOT.HEADER formula caused a traceback. Task-id 2833129
This update fixes minor code quality issues flagged by automated checks across several Odoo Enterprise modules. It helps keep the software easier to maintain and reduces the risk of small internal errors, without introducing visible functional changes for users.
Original PR description
COM PR: https://github.com/odoo/odoo/pull/86332
Miscellaneous changes
With this commit, we set the asset's deprecation moves to auto_post = True after modifying the asset. Steps to reproduce: - Create an asset for several months in the future, and confirm it - Modify the asset -> deprecation moves are not set to be auto post anymore Add auto_post to the field which are returned by _prepare_move_for_asset_depreciation method, like we were doing in version 13 opw-2823359 opw-2833078 Forward-Port-Of: odoo/enterprise#26659
Original PR description
With this commit, we set the asset's deprecation moves to auto_post = True after modifying the asset. Steps to reproduce: - Create an asset for several months in the future, and confirm it - Modify the asset -> deprecation moves are not set to be auto post anymore Add auto_post to the field which are returned by _prepare_move_for_asset_depreciation method, like we were doing in version 13 opw-2823359 opw-2833078 Forward-Port-Of: odoo/enterprise#26659
Forward-Port-Of: odoo/enterprise#26684
Original PR description
Forward-Port-Of: odoo/enterprise#26684
Currency,The project.task gantt view shows connected lines even if task dependency is disabled in project. After this commit the connector lines in the project.task gantt view are displayed only when task dependency is enabled for the project; otherwise, the lines are not displayed in the gantt view task-2762166 closes https://github.com/odoo/enterprise/pull/25130 Forward-Port-Of: odoo/enterprise#26626 Forward-Port-Of: odoo/enterprise#25130
Original PR description
Currency,The project.task gantt view shows connected lines even if task dependency is disabled in project. After this commit the connector lines in the project.task gantt view are displayed only when task dependency is enabled for the project; otherwise, the lines are not displayed in the gantt view task-2762166 closes https://github.com/odoo/enterprise/pull/25130 Forward-Port-Of: odoo/enterprise#26626 Forward-Port-Of: odoo/enterprise#25130
The extra subcontracting cost given by the purchase order from the subcontractor is reflected on the subcontracting MO via the extra_cost field. This value is read at the MO creation. Commit https://github.com/odoo/odoo/commit/cc6bf4316580a96d1180724d4e8f464dcf50f2a3 already fix the extra_cost update at MO validation. There is still an issue in the cost analysis report. The subcontracting cost is still the first Purchase order line price because it is read on the stock move and not on the
Original PR description
The extra subcontracting cost given by the purchase order from the subcontractor is reflected on the subcontracting MO via the extra_cost field. This value is read at the MO creation. Commit https://github.com/odoo/odoo/commit/cc6bf4316580a96d1180724d4e8f464dcf50f2a3 already fix the extra_cost update at MO validation. There is still an issue in the cost analysis report. The subcontracting cost is still the first Purchase order line price because it is read on the stock move and not on the extra_cost. Task : 2812414 Forward-Port-Of: odoo/enterprise#26610
Steps to reproduce the issues: Issues found using a mobile device only. On the industry fsm module, the worker and customer sections overlap. task-2755200 Forward-Port-Of: odoo/enterprise#26505 Forward-Port-Of: odoo/enterprise#24868
Original PR description
Steps to reproduce the issues: Issues found using a mobile device only. On the industry fsm module, the worker and customer sections overlap. task-2755200 Forward-Port-Of: odoo/enterprise#26505 Forward-Port-Of: odoo/enterprise#24868
Using a simpler domain allows to get rid of a sub query. `reconciliation_invoice_id` is a one2many field, we could simply use the many2one instead as searching on a one2many generates a unnecessary sub query. This is helpful as this domain is used in `_compute_has_matching_suspense_amount`, so it is computed at every account.move form view load. Note: on a large db (6M account.move.line) from Execution Time: 1485.972 ms to Execution Time: 0.653 ms Forward-Port-Of: odoo/enterpris
Original PR description
Using a simpler domain allows to get rid of a sub query. `reconciliation_invoice_id` is a one2many field, we could simply use the many2one instead as searching on a one2many generates a unnecessary sub query. This is helpful as this domain is used in `_compute_has_matching_suspense_amount`, so it is computed at every account.move form view load. Note: on a large db (6M account.move.line) from Execution Time: 1485.972 ms to Execution Time: 0.653 ms Forward-Port-Of: odoo/enterprise#26548
Move the handler of 'voip_reload_chatter' to chatter instead of activity because currently, this will likely trigger as many reload as there are activities Task-2659932 Forward-Port-Of: odoo/enterprise#26591 Forward-Port-Of: odoo/enterprise#26337
Original PR description
Move the handler of 'voip_reload_chatter' to chatter instead of activity because currently, this will likely trigger as many reload as there are activities Task-2659932 Forward-Port-Of: odoo/enterprise#26591 Forward-Port-Of: odoo/enterprise#26337
In the Document app, go to any workspace (except the Spreadsheet workspace) and create a spreadsheet. => the spreadsheet is always created in the Spreadsheet workspace instead of the current workspace Forward-Port-Of: odoo/enterprise#26465
Original PR description
In the Document app, go to any workspace (except the Spreadsheet workspace) and create a spreadsheet. => the spreadsheet is always created in the Spreadsheet workspace instead of the current workspace Forward-Port-Of: odoo/enterprise#26465
Step to reproduce: Install accounting Set a user with "Billing" rights Current behavior: From a followup report the user with billing rights can not access an invoice view. Expected behavior: The user with billing rights has an option View Invoice when the user is hovering the invoice in followup report. Solution: We add the billing group to the groups allowed for the button opw-2811678 Forward-Port-Of: odoo/enterprise#26102
Original PR description
Step to reproduce: Install accounting Set a user with "Billing" rights Current behavior: From a followup report the user with billing rights can not access an invoice view. Expected behavior: The user with billing rights has an option View Invoice when the user is hovering the invoice in followup report. Solution: We add the billing group to the groups allowed for the button opw-2811678 Forward-Port-Of: odoo/enterprise#26102
Some part of the code of the mobile control panel have not been adapted to Owl 2 since the merge of the latest major version of the framework. A ref to a node must be used to avoid a crash in the ControlPanel component. A test has been added to assure the desired behavior of the control panel. Forward-Port-Of: odoo/enterprise#26528
Original PR description
Some part of the code of the mobile control panel have not been adapted to Owl 2 since the merge of the latest major version of the framework. A ref to a node must be used to avoid a crash in the ControlPanel component. A test has been added to assure the desired behavior of the control panel. Forward-Port-Of: odoo/enterprise#26528
* helpdesk{_fsm_report}, industry_fsm_sale_report PURPOSE bug fixes for field services SPECIFICATION In helpdesk, - helpdesk.ticket: it should be possible to assign any helpdesk > user to a ticket of a private team, even if the user is not following the team In helpdesk_fsm_report, - helpdesk.ticket > create task wizard: the 'worksheet template' field should only contain templates from fsm In industry_fsm_sale_report, - display only fsm task templates in worksheet task-
Original PR description
* helpdesk{_fsm_report}, industry_fsm_sale_report
PURPOSE
bug fixes for field services
SPECIFICATION
In helpdesk,
- helpdesk.ticket: it should be possible to assign any helpdesk > user to
a ticket of a private team, even if the user is not following the team
In helpdesk_fsm_report,
- helpdesk.ticket > create task wizard: the 'worksheet template' field
should only contain templates from fsm
In industry_fsm_sale_report,
- display only fsm task templates in worksheet
task-2733415
Forward-Port-Of: odoo/enterprise#25638