env = env # noqa # List all ir.actions.report bindings on the models we care about MODELS = ['sale.order', 'account.move', 'stock.picking', 'mrp.production', 'fusion.plating.delivery', 'account.payment', 'fusion.plating.portal.job', 'fp.certificate'] print(f'{"model":<32} {"xmlid":<55} {"name":<40}') print('-' * 130) for m in MODELS: model = env['ir.model'].search([('model', '=', m)], limit=1) if not model: continue reports = env['ir.actions.report'].search([ ('binding_model_id', '=', model.id), ('binding_type', '=', 'report'), ]) for r in reports: # Get the xmlid xmlids = env['ir.model.data'].search([ ('model', '=', 'ir.actions.report'), ('res_id', '=', r.id) ]) xmlid = ', '.join(f'{x.module}.{x.name}' for x in xmlids) or '(no xmlid)' is_fp = 'fusion_plating' in xmlid marker = '✓ FP' if is_fp else ' ' print(f' {marker} {m:<28} {xmlid:<55} {r.name[:40]}')