Friday, February 24, 2023
6 changes · master
Code cleanup and technical improvements
This update reorganizes how Odoo’s web interface passes field display details to its field components. It supports future improvements to forms, lists, and kanban views, especially where the same field appears multiple times with different display rules, without changing visible behavior for users now.
Original PR description
This commit is part of the preliminary work to rewrite the form, list and kanban model. We want this new Model to only be aware of field related information it needs (whereas in its current…
This commit is part of the preliminary work to rewrite the form, list and kanban model. We want this new Model to only be aware of field related information it needs (whereas in its current implementation, the model stores all the information extracted from the field node in the arch). This would allow to properly manage multiple occurrences of the same field in views, that is, each occurrence would be represented by a field component (if visible of course), and that field component would use the field information of the arch node it represents. To this end, we want fields from not using anymore information stored in activeFields in the record datapoint. Instead, we now call extractProps with the whole fieldInfo (the information extracted from the arch), s.t. each field can generate the props it needs from those information (e.g. sub views for x2manys). This commit doesn't remove the use of record.activeFields in concrete fields (this will come later), but reworks the fieldInfo object generated by parseFieldNode, and provide it to the calls of extractProps. In fieldInfo, the `options` key is no longer inside `attrs`, as it is now top-level, alongside several other generic keys that have been processed (like on_change, modifiers...). For that reason, a lot of extractProps definitions had to be adapted. Part of task 3179751
This update reorganizes product attribute code into smaller, clearer files without changing product behavior. It helps make future maintenance and improvements to product configuration easier and safer for the development team.
Original PR description
--- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
This update reorganizes how dynamic placeholders are handled in emails and editor fields, making the feature easier to maintain without changing the main user workflow. It also adds automated checks for the placeholder dropdown to help prevent future regressions.
Original PR description
Refactor the Dynamic Placeholder hook to have better separation of concern from the Field that need it. task-3081325 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
This internal cleanup makes dialog handling available by default in control panel test setup. It helps keep tests for views, search menus, timesheets, projects, and dialogs more consistent and easier to maintain without changing day-to-day user workflows.
Original PR description
From a practical point of view, it seems better to also add the dialog service in the service registry when calling setupControlPanelServiceRegistry.
This change updates internal test setup so the dialog capability is registered only once when preparing view control panels. It reduces the risk of crashes during testing and keeps spreadsheet, cohort, pivot, and map view behavior stable.
Original PR description
The dialog service is now always added in the service registry when calling setupControlPanelServiceRegistry. So it cannot be added again (without option force=true) without causing a crash.
This change aligns several Odoo apps with an updated internal way of passing field configuration data in the web interface. It should help keep custom views and field behavior consistent with the main platform changes, with little direct impact on day-to-day users.
Original PR description
This commit is the counterpart of https://github.com/odoo/odoo/pull/113092, where fieldInfo and the API of extractProps have been slightly reworked. Part of task 3179751