Monday, October 30, 2023
4 changes · master
Code cleanup and technical improvements
This update streamlines how Odoo loads web assets such as scripts and styles across several website and editor features. It is an internal cleanup that should make future maintenance easier without changing day-to-day user workflows.
Original PR description
The loadBundle() function has been simplified to only accept the bundle name (and no longer an object) as an argument. The loadBundle() function calls getBundle(). Except in special cases, it is no longer necessary to call getBundle(). In widgets, we call loadBundle directly rather than using jsLibs and cssLibs lists. Also, jsContents and cssContents are no more used in codebase. task-3266441 https://github.com/odoo/enterprise/pull/49466
The Project app’s personal task stage handling was simplified by removing outdated view code after a broader refactor. This reduces maintenance complexity and helps keep task stage grouping and drag-and-drop behavior reliable without changing the core user workflow.
Original PR description
Removing unused view in master after the merge of the refactoring described below in 17.0. See: https://github.com/odoo/odoo/pull/140050 Personal stages of project.stage records are based on two main…
Removing unused view in master after the merge of the refactoring described below in 17.0. See: https://github.com/odoo/odoo/pull/140050 Personal stages of project.stage records are based on two main fields: - personal_stage_type_ids: the list of all personal stages linked to a task (M2M) - personal_stage_type_id: a computed field (not stored) indicating the personal stage of a task for the current user. When reading a set of project.task records grouped by personal stages, two options are possible: - Group the records by personal_stage_type_id (approach used in former app Notes): in which case the read_group method has to ne rewritten as it can be used on a non-stored field. - Group the records by personal_stage_type_ids (approach used in app Project) in which case, the kanban view has to be overridden to be able to drag and drop a task between personal stages (which is not possible by default, when grouping according to a M2M field). The main evolution proposed by this refactor is to use an hybrid approach that would: 1. Group the project.task records by personal_stage_type_id 2. Use the read_group with groupby set to 'personal_stage_type_ids' as this should give the same result. This would allow to: - Avoid a complex and costly (performance wise) read_group override - Avoid an override of the kanban view that is costly to maintain - Simplify the implementation (and thus readability) of personal stage management (among which, removal of the model project.task.stage.personal). task-3345132
This update streamlines how accounting matching search options handle active items. It is an internal cleanup that should keep the user experience unchanged while making the feature easier to maintain.
Original PR description
It is now possible to filter on isActive in getSearchItems. We use that possibility here.
This change streamlines how web resources are loaded in the Planning and VoIP areas. It is an internal cleanup that should make the code easier to maintain without changing how users interact with these features.
Original PR description
The loadBundle() function has been simplified to only accept the bundle name (and no longer an object) as an argument. The loadBundle() function calls getBundle(). Except in special cases, it is no longer necessary to call getBundle(). In widgets, we call loadBundle directly rather than using jsLibs and cssLibs lists. Also, jsContents and cssContents are no more used in codebase. task-3266441 https://github.com/odoo/odoo/pull/139578