'Retrieves the architecture of views that inherit from the given view, from the sets of
views that should currently be used in the system. During the module upgrade phase it
may happen that a view is present in the database but the fields it relies on are not
fully loaded yet. This method only considers views that belong to modules whose code
is already loaded. Custom views defined directly in the database are loaded only
after the module initialization phase is completely finished.
:param int view_id: id of the view whose inheriting views should be retrieved
:param str model: model identifier of the inheriting views.
:rtype: list of tuples
:return: [(view_arch,view_id), ...]'

@api.model
def get_inheriting_views_arch(self, view_id, model):

    user_groups = self.env.user.groups_id
    conditions = [['inherit_id', '=', view_id], ['model', '=', model], ['mode', '=', 'extension'], ['active', '=', True]]
    if (self.pool._init and (not self._context.get('load_all_views'))):
        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)
    return [(view.arch, view.id) for view in views.sudo() if ((not view.groups_id) or (view.groups_id & user_groups))]
