diff --git a/addons/web/views/report_templates.xml b/addons/web/views/report_templates.xml index 4825d25efb1ab4ca17fa4efe00f5594a67f5c2db..573d1f1a161f78890735425e1dbc224d3a8934bd 100644 --- a/addons/web/views/report_templates.xml +++ b/addons/web/views/report_templates.xml @@ -525,7 +525,7 @@ <t t-if="company_id"> <t t-set="company" t-value="company_id"/> </t> - <t t-elif="o and 'company_id' in o"> + <t t-elif="o and 'company_id' in o and o.company_id.sudo()"> <t t-set="company" t-value="o.company_id.sudo()"/> </t> <t t-else="else"> @@ -546,7 +546,7 @@ <t t-if="company_id"> <t t-set="company" t-value="company_id"/> </t> - <t t-elif="o and 'company_id' in o"> + <t t-elif="o and 'company_id' in o and o.company_id.sudo()"> <t t-set="company" t-value="o.company_id.sudo()"/> </t> <t t-else="else">