Daily updates from Odoo
Monday, July 24, 2023
1 change · master
Code cleanup and technical improvements
Several Odoo Enterprise apps were adjusted to work with the platform’s new relational data model. This is mainly an internal modernization that helps keep accounting, documents, web studio, and related interfaces reliable as the underlying framework changes.
Original PR description
This PR adapts the code in addons w.r.t. the introduction of the RelationalModel [1]. Main changes that were requested are: - record datapoints no longer always have an "id" key in their data (they still do if the id field is in the view), so we use record.resId instead - the new model is based on fined-grained reactivity, so several components that previously relied on onWillUpdateProps to update their internal state no longer worked. Typically, using the hook "observeRecord" is the way to go now. - specialdata are no longer handled in the model, so the components needing specialData can use the hook "useSpecialData" - more generally, all overrides of models (RelationalModel or KanbanModel) needed to be reworked. Part of task~3179751 [1] odoo/odoo#114024 Co-authored-by: Aaron Bohy <aab@odoo.com> Co-authored-by: FrancoisGe <fge@odoo.com> Co-authored-by: Jorge Pinna Puissant <jpp@odoo.com> Co-authored-by: Pierre Rousseau <pro@odoo.com>