[FIX] l10n_din5008: hide all header if not needed

Steps to reproduce:
- Install Accounting and l10n_ch
- Switch to a Swiss company
- Go to Settings and make sure that DIN5008 is selected as Document Layout
- Go to Accounting settings and activate "QR Codes" option
- Create an invoice for an Swiss contact
- Print the invoice
=> The DIN5008 header is appearing on the QR code page.

No header should appear on the QR code page with DIN5008.

opw-3529963

closes odoo/odoo#142778

X-original-commit: c0511e88cf71fb99c6b43d7a2646e6c291e4b062
Signed-off-by: Olivier Colson (oco) <oco@odoo.com>
Signed-off-by: Anh Thao Pham (pta) <pta@odoo.com>
This commit is contained in:
Anh Thao Pham (pta)
2023-11-21 07:56:13 +00:00
parent c862dff8be
commit 970c72fa17
@@ -46,7 +46,8 @@
<div t-attf-class="din_page invoice_note article o_company_#{company.id}_layout {{'o_report_layout_background' if company.layout_background in ['Geometric', 'Custom'] else ''}} #{'din_page_pdf' if report_type == 'pdf' else ''}"
t-attf-style="background-image: url({{ 'data:image/png;base64,%s' % company.layout_background_image.decode('utf-8') if company.layout_background_image and company.layout_background == 'Custom' else '/base/static/img/bg_background_template.jpg' if company.layout_background == 'Geometric' else ''}});"
t-att-data-oe-model="o and o._name"
t-att-data-oe-id="o and o.id">
t-att-data-oe-id="o and o.id"
t-if="not skip_headers">
<table class="din_company_info table-borderless">
<tr>
<td>
@@ -91,7 +92,7 @@
</div>
</td>
</tr>
<div t-if="not skip_headers">
<div>
<tr t-if="o and 'l10n_din5008_addresses' in o">
<t t-foreach="o.l10n_din5008_addresses" t-as="doc_address">
<td>