Files
odoo_source/addons/payment_transfer/views/payment_transfer_templates.xml
T
Yolann Sabaux a2d5ddd165 [FIX] payment[_transfer]: enable qr code for portal payments
Steps to reproduce:
- configure a qr-code set up for a belgian company
https://www.odoo.com/documentation/15.0/applications/finance/accounting/receivables/customer_invoices/epc_qr_code.html?highlight=bank%20account
- activate acquirer "wire transfer" and activate qr-code
- create an invoice
- generate a payment link
- open the link and select wire transfer

Issue:
The qr-code will not be displayed

Cause:
- missing qr code template
- incorrect info fetching for the qr code

Solution:
- correct info fetching for the qr code such as in
https://github.com/odoo/odoo/blob/15a5bc956ad865d4a6ebb001b5767a5009533782/addons/website_sale/views/templates.xml#L1852
commit : 15a5bc956ad865d4a6ebb001b5767a5009533782

opw-2903527

closes odoo/odoo#98742

X-original-commit: e3ea1bb5c7339d6f4dc372b14c012a6d0711e845
Signed-off-by: Antoine Vandevenne (anv) <anv@odoo.com>
Signed-off-by: Yolann Sabaux (yosa) <yosa@odoo.com>
2022-08-24 09:29:22 +02:00

28 lines
1.1 KiB
XML

<?xml version="1.0" encoding="utf-8"?>
<odoo>
<template id="redirect_form">
<form t-att-action="api_url" method="post">
<input type="hidden" name="reference" t-att-value="reference"/>
</form>
</template>
<template id="transfer_transaction_status" inherit_id="payment.transaction_status">
<xpath expr="//div[@id='o_payment_status_alert']" position="inside">
<t t-if="tx.acquirer_id.sudo().provider == 'transfer'">
<div t-if="tx.reference">
<strong>Communication: </strong><span t-esc="tx.reference"/>
</div>
<div t-if="tx.acquirer_id.sudo().qr_code">
<t t-set="qr_code" t-value="tx.company_id.sudo().partner_id.bank_ids[:1].build_qr_code_base64(tx.amount, tx.reference, None, tx.currency_id, tx.partner_id)"/>
<div t-if="qr_code" class="mt-2">
<h3>Or scan me with your banking app.</h3>
<img class="border border-dark rounded" t-att-src="qr_code"/>
</div>
</div>
</t>
</xpath>
</template>
</odoo>