Skip to content
Snippets Groups Projects
Commit 8b7ca94c authored by Nasreddin (bon)'s avatar Nasreddin (bon)
Browse files

[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: 7c451004
Signed-off-by: default avatarbon-odoo <nboulif@users.noreply.github.com>
parent ad56d50e
No related branches found
No related tags found
No related merge requests found
......@@ -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">
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment