[FIX] account,l10n_ch: report inheritance

make the qr code section easier to modify in the base report for the
swiss localization

X-original-commit: 105557cc817fc9d21837ee50ba4fbc502926d059
Part-of: odoo/odoo#129492
This commit is contained in:
Damien Bouvy
2023-07-25 00:54:54 +02:00
parent 4e08fe09c8
commit c8367dd53c
2 changed files with 4 additions and 3 deletions
+2 -1
View File
@@ -263,7 +263,8 @@
Payment Communication: <span class="fw-bold" t-field="o.payment_reference">INV/2023/00001</span>
</p>
</div>
<div t-if="not (o.display_qr_code and o.amount_residual > 0)" class="oe_structure"></div>
<t t-set="show_qr" t-value="o.display_qr_code and o.amount_residual > 0"/>
<div t-if="not show_qr" name="qr_code_placeholder" class="oe_structure"></div>
<div id="qrcode" class="d-flex mb-3 avoid-page-break-inside" t-else="">
<div class="qrcode me-3" id="qrcode_image">
<t t-set="qr_code_url" t-value="o._generate_qr_code(silent_errors=True)"/>
+2 -2
View File
@@ -1,8 +1,8 @@
<?xml version="1.0"?>
<odoo>
<template id="l10n_ch_report_invoice_document" inherit_id="account.report_invoice_document">
<xpath expr="//div[@id='qrcode']" position="attributes">
<attribute name="t-if" add="and o.qr_code_method != 'ch_qr'" separator=" "/>
<xpath expr="//t[@t-set='show_qr']" position="attributes">
<attribute name="t-value" add="and o.qr_code_method != 'ch_qr'" separator=" "/>
</xpath>
</template>
</odoo>