Wednesday, March 8, 2023
2 changes
Code cleanup and technical improvements
This update removes repeated setup details that Odoo already fills in automatically for many actions. It does not change how users work with the system, but it makes the configuration files cleaner and easier to maintain.
Original PR description
The type fields of actions already defaults to the model name in the base model definition. Therefore, specifying `ir.actions.server`, `ir.actions.act_window` & so on as type is useless (and adds noise since it's the same as the action model). Community PR: https://github.com/odoo/odoo/pull/114539
This change simplifies how the system tracks edited fields in form views by keeping specialized translation logic where it is actually used. It should not change day-to-day behavior for users, but it makes the code easier to maintain and reduces the risk of future issues.
Original PR description
The logic of dirtyTranslatableFields is only needed in one place in the form view. We will therefore remove this function from the model. We'll take the opportunity to replace dirtyFields with isDirtyField because all uses of dirtyFields want to check with the name of a field if it is dirty or not. Part of Task: 3179751