diff --git a/addons/portal/controllers/portal.py b/addons/portal/controllers/portal.py index be3a6eabf34..f0f4920a4a1 100644 --- a/addons/portal/controllers/portal.py +++ b/addons/portal/controllers/portal.py @@ -410,6 +410,9 @@ class CustomerPortal(Controller): if not isinstance(report_sudo, type(request.env['ir.actions.report'])): raise UserError(_("%s is not the reference of a report", report_ref)) + if hasattr(model, 'company_id'): + report_sudo = report_sudo.with_company(model.company_id) + method_name = '_render_qweb_%s' % (report_type) report = getattr(report_sudo, method_name)([model.id], data={'report_type': report_type})[0] reporthttpheaders = [