summaryrefslogtreecommitdiff
path: root/addons/web
diff options
context:
space:
mode:
authorNasreddin (bon) <bon@odoo.com>2021-01-27 14:09:54 +0000
committerNasreddin (bon) <bon@odoo.com>2021-01-28 10:59:09 +0000
commit8b7ca94c70e374f7c0d5850a7976bc2cbf0b0b40 (patch)
treeb2844e5bef7fb795858462e767647d9947554b40 /addons/web
parentad56d50e3da000cacdc70d9230cad308d03680bf (diff)
[FIX] web: Display Header/Footer company details on Contact reports
Issue - Install "Contacts" and "Studio" modules - Go to "Contacts" and switch to Studio - Go to "Reports" tab - Create a new report - Select "External" layout Header and footer are missing on report. Cause Header is displayed if 'company' has a value. However, here, we only check if 'company_id' is available in current record fields, not checking if also set. Solution Check that 'company_id' is set on current record, else, fallback on 'res_company'. opw-2443234 closes odoo/odoo#65202 X-original-commit: 7c4510042ec35a7da10741595a4da56c3b3c4cdf Signed-off-by: bon-odoo <nboulif@users.noreply.github.com>
Diffstat (limited to 'addons/web')
-rw-r--r--addons/web/views/report_templates.xml4
1 files changed, 2 insertions, 2 deletions
diff --git a/addons/web/views/report_templates.xml b/addons/web/views/report_templates.xml
index 4825d25efb1..573d1f1a161 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">