[FIX] base: include installed module in inheriting views retrival
In a scenario with the following views: Mod A, view 1* |-- Mod B, view 2 \-- Mod B, view 3* view 3 can not rely on the elements added by view 2 in xpath If view 3 is a primary view, view 1 must be fully resolved first (apply view 2) before resolving view 3. Next commit describes a real use-case with product. Linked to #16541 and #16428
This commit is contained in:
@@ -431,7 +431,8 @@ actual arch.
|
||||
# cannot currently use relationships that are
|
||||
# not required. The root cause is the INNER JOIN
|
||||
# used to implement it.
|
||||
views = self.search(conditions + [('model_ids.module', 'in', tuple(self.pool._init_modules))])
|
||||
modules = tuple(self.pool._init_modules) + (self._context.get('install_mode_data', {}).get('module'),)
|
||||
views = self.search(conditions + [('model_ids.module', 'in', modules)])
|
||||
views = self.search(conditions + [('id', 'in', list(self._context.get('check_view_ids') or (0,)) + map(int, views))])
|
||||
else:
|
||||
views = self.search(conditions)
|
||||
|
||||
Reference in New Issue
Block a user