Daily updates from Odoo
Navigate
Branch
Wednesday, April 27, 2022
25 changes
Enhancements to existing features
Users can now give clear custom names to pivots, lists, and action links in Documents spreadsheets. This makes spreadsheets easier to understand when multiple reporting elements are inserted, reducing confusion and improving navigation.
Original PR description
Before this commit, the name of pivots/lists were the display name of the technical model. When users insert mutilple pivots/lists on the same spreadsheet, it quickly becomes difficulte to know what pivot/list is used for what. With this commit, users are now able to give a name, either from the spreadsheet selector dialog or from the side panel. Task-id 2696631
This update refreshes the spreadsheet component used in Documents with recent improvements. Users get smoother formula editing with arrow keys and easier chart actions via right-click menus, while internal test and code maintenance changes improve reliability.
Original PR description
### Contains the following commits: https://github.com/odoo/o-spreadsheet/commit/4c088fc7 [IMP] composer: arrow always moves the cursor when editing a formula https://github.com/odoo/o-spreadsheet/commit/759d1cff [IMP] charts: can open menu with right-click https://github.com/odoo/o-spreadsheet/commit/2ab69179 [FIX] tests: fix FakeTimers warning in grid tests https://github.com/odoo/o-spreadsheet/commit/4660f4dd [REF] highlights: rename `sheet` to `sheetId` https://github.com/odoo/o-spreadsheet/commit/d8d14870 [REF] highlights: use zones instead of string xcs https://github.com/odoo/o-spreadsheet/commit/b86dd634 [IMP] tests: introduce gridMouseEvent helper https://github.com/odoo/o-spreadsheet/commit/c12e1af9 [FIX] tests: adapt edge-scrolling tests to 86db8e6d
Payroll access has been refined with a new employee manager role. Managers can now view contracts for their direct reports without receiving broader payroll officer or administrator access to all company salary information.
Original PR description
Currently, there are two security toles in Payroll: officer and administrator. Both rols allow the user to have a full overview on all salaries of the company. This commit adds an employee manager role allowing an employee manager to view his reports' contracts. task-2731933
The live currency rate update process now handles provider errors more transparently and avoids waiting too long when external services do not respond. Company currency provider settings are also applied more consistently during setup, reducing configuration confusion.
Original PR description
Do not discard exceptions ========================= Simply returning False makes it impossible to know what the error was when it was raised since nothing is logged. It is also hiding the real nature…
Do not discard exceptions ========================= Simply returning False makes it impossible to know what the error was when it was raised since nothing is logged. It is also hiding the real nature of the error one might not even have thought of. A bare except is also bad practice because it is catching more than Exceptions Add timeout and raise for status ================================ We don't want the cron pool to be saturated for longer than needed because a distant server is not responding. It is also cleaner to fail with a good type of Exception and message thanks to `raise_for_status` instead of having keys missing in the json dict later or whatnot. Do not default provider only on company create ============================================== Having a default + `create` extension won't change the value if you change the country after having created the company, which might be the case when setuping a new database for instance. Require interval unit ===================== Since the code doesn't make a difference between `manually` and `False`, remove confusion by removing the ability to empty the field.
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
Fixes a problem where inserting some accounting pivot tables into a spreadsheet could fail when the data was grouped by date without an extra date setting. This helps users reliably analyze journal entries and other date-based reports in spreadsheets.
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
Code cleanup and technical improvements
Spreadsheets in Documents now load pivot and list data only when it is actually needed, such as when the relevant sheet is opened or filters change. This reduces unnecessary server calls and should make complex spreadsheets and dashboard templates open faster without changing user-facing features.
Original PR description
Various optimizations to lazy load data sources as much as possible. The main idea is to load data sources only if really needed. If the pivot is on Sheet2 but you never go to that sheet, the data source should never be loaded. See commit messages for details
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