When the ACE editor was introduced in [1], it relied on the already existing `_views_get` to obtain the list of views that could be edited. When the `mode` of `ir.ui.view` was introduced in [2], no mechanism was introduced in `_views_get` to avoid fetching primary views that have nothing in common with the current view. This commit adds a parameter to `_views_get` to request the exclusion of unrelated primary views. Since even before it appeared in [3], `_views_get` relies on the following approach: - consider the top-most parent of the `t-call`ed views - consider the views that inherit it I.e.: reach each node of each view hierarchy tree by starting from its root. Because this starts from the top-most parent, simply preventing the call to each primary child view is wrong, because any child on the parent path must be considered - be it primary or not. We therefore introduced a `skipped` list that keeps track of those "later to be processed" views - so that the filtering of primary children does not remove them. [1]: https://github.com/odoo/odoo/commit/7c45e5976e6caf3d7b9eb508f728062704232261 [2]: https://github.com/odoo/odoo/commit/434be479f97a32987d0817bf329183fc2bbe3bf5 [3]: https://github.com/odoo/odoo/commit/bff6e04e9536d7b80916987eb123de98b1b689b1 task-2898555 closes odoo/odoo#100625 X-original-commit: 34ac97ce96019573a6a0af968d9c90b9d0d89ae8 Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>