Odoo Mindscape. Understand Odoo faster. Explore modules, fields, dependencies and version differences in one place instead of digging through the source code.

Module: Base

Entity: ir.actions.report

Compute Method: _compute_linked_view_ids

Inputs Method Outputs
suffixes = {action: action.report_name.split('.')[1] for action in self if '.' in (action.report_name or '')}
views = self.env['ir.ui.view'].search(Domain('type', '=', 'qweb') & Domain.OR(Domain('name', 'ilike', suffix) for suffix in suffixes.values()))
for action in self:
            action.linked_view_ids = views.filtered_domain(Domain('name', 'ilike', suffixes.get(action))) if suffixes.get(action) else views.browse()
            action.linked_view_count = len(action.linked_view_ids)

Back to entity