Friday, May 27, 2022
2 changes · master
Resolved issues and error corrections
This fix stops Odoo from automatically loading hidden form views inside related record fields, because that behavior caused unnecessary recalculations and could slow down or break some workflows. List and kanban views will still be preloaded, preserving the intended performance benefit where it is safer.
Original PR description
odoo/odoo#87522 introduced the concept to automatically inline tree, kanban and form views under one2many/many2many fields within form views. The goal being for the web client to make less…
odoo/odoo#87522 introduced the concept to automatically inline tree, kanban and form views under one2many/many2many fields within form views. The goal being for the web client to make less `get_views` calls. However, currently, automatically inlined form views under one2many/many2many fields leads to more triggered onchanges than before, triggering more field computations than before, potentially leading to performance issues as more fields are computed than before. Besides, they are not visible in the tree/kanban view and their computation can therefore be considered useless. At worst, it can even causes bugs, by triggering computation in places they were not used / do not handle correctly, as explained in https://github.com/odoo/odoo/pull/87522#issuecomment-1132554918 odoo/odoo#91878 This revision reverts the behavior to automatically inline form views, while keeping the inlining of kanban/tree views. However, by reverting this, we re-introduce a limitation of the web client behavior regarding onchanges, explained in odoo/odoo#91935. This is therefore not perfect, but at least the previous behavior is back. In the future, work will be done to re-introduce the automatically inlined form view, while solving both issues: - Do not trigger more onchanges than necessary, - Solve the limitation of the web client shown in odoo/odoo#91935
This fix reduces unnecessary internal refresh work when updating module dependencies. It helps keep module updates more efficient without changing what business users see or how they work.
Original PR description
This follows up https://github.com/odoo/odoo/pull/87527.