[FIX] account: qr_code_urls bug in report invoice template
To reproduce: 1) activate qr code on invoices 2) print an invoice with a qr code 3) print a followup letter, and attach the printed invoice -> error due to missing 'qr_code_urls' variable in invoice template This can happen with any report calling this template, thus we decided to set the qr_code_urls inside the `report_invoice_document` template directly, so we never need to set it again in _get_report_values() This allows to remove the following report classes (done in master due to stable policy) - `ReportInvoiceWithoutPayment` - `ReportInvoiceWithPayment` - `PosInvoiceReport` (not even used anywhere) closes odoo/odoo#106605 X-original-commit: a87460bdb82b7b2ab88f397f3506d0f380d86cfd Signed-off-by: Brice Bartoletti (bib) <bib@odoo.com>
This commit is contained in:
@@ -246,9 +246,10 @@
|
||||
<strong>Incoterm: </strong><span t-field="o.invoice_incoterm_id.code"/> - <span t-field="o.invoice_incoterm_id.name"/>
|
||||
</p>
|
||||
<div id="qrcode" t-if="o.display_qr_code and o.amount_residual > 0">
|
||||
<p t-if="qr_code_urls.get(o.id)">
|
||||
<t t-set="qr_code_url" t-value="o._generate_qr_code()"/>
|
||||
<p t-if="qr_code_url">
|
||||
<strong class="text-center">Scan me with your banking app.</strong><br/><br/>
|
||||
<img class="border border-dark rounded" t-att-src="qr_code_urls[o.id]"/>
|
||||
<img class="border border-dark rounded" t-att-src="qr_code_url"/>
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user