[FIX] account, payment, website_sale: QR code based on partner's country
The QR code was limited to a set of countries listed from Wikipedia [1], but the list is incomplete. Any partner from a SEPA country should have the QR code printed since we don't know which banks support it. At the moment we simply remove the limitation, and hopefully a proper filtering will be done in master. [1] https://en.wikipedia.org/wiki/EPC_QR_code opw-2052315 closes odoo/odoo#35827 Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
This commit is contained in:
@@ -181,7 +181,7 @@
|
||||
<p t-if="o.fiscal_position_id.note" name="note">
|
||||
<span t-field="o.fiscal_position_id.note"/>
|
||||
</p>
|
||||
<div id="qrcode" t-if="(o.partner_id.country_id.code in ['BE', 'AT', 'DE', 'FI', 'NL']) and (o.company_id.qr_code) and (o.currency_id.name == 'EUR') and (o.partner_bank_id.acc_number != False)">
|
||||
<div id="qrcode" t-if="(o.company_id.qr_code) and (o.currency_id.name == 'EUR') and (o.partner_bank_id.acc_number != False)">
|
||||
<p t-if="(o.partner_bank_id.qr_code_valid)">
|
||||
<strong class="text-center">Scan me with your banking app.</strong><br /><br />
|
||||
<img class="border border-dark rounded" t-att-src="o.partner_bank_id.build_qr_code_url(o.residual,(o.reference) if (o.reference) else o.number)"/>
|
||||
|
||||
@@ -139,7 +139,7 @@
|
||||
<div t-if="thanks_msg and payment_tx_id.acquirer_id.provider == 'transfer' and reference">
|
||||
<b>Communication: </b><span t-esc='reference'/>
|
||||
</div>
|
||||
<div t-if="(payment_tx_id.partner_id.country_id.code in ['BE', 'AT', 'DE', 'FI', 'NL']) and (payment_tx_id.acquirer_id.qr_code == True) and (payment_tx_id.currency_id.name == 'EUR')">
|
||||
<div t-if="(payment_tx_id.acquirer_id.qr_code == True) and (payment_tx_id.currency_id.name == 'EUR')">
|
||||
<div t-if="payment_tx_id.acquirer_id.journal_id.bank_account_id.qr_code_valid">
|
||||
<h3>Or scan me with your banking app.</h3>
|
||||
<img class="border border-dark rounded" t-att-src="payment_tx_id.acquirer_id.journal_id.bank_account_id.build_qr_code_url(payment_tx_id.amount,payment_tx_id.reference)"/>
|
||||
|
||||
@@ -1618,7 +1618,7 @@
|
||||
<b>Communication: </b><span t-esc='order.reference'/>
|
||||
</div>
|
||||
</div>
|
||||
<div t-if="(payment_tx_id.acquirer_id.qr_code == True) and (payment_tx_id.acquirer_id.provider == 'transfer') and (payment_tx_id.partner_id.country_id.code in ['BE', 'AT', 'DE', 'FI', 'NL']) and (payment_tx_id.currency_id.name == 'EUR')">
|
||||
<div t-if="(payment_tx_id.acquirer_id.qr_code == True) and (payment_tx_id.acquirer_id.provider == 'transfer') and (payment_tx_id.currency_id.name == 'EUR')">
|
||||
<div class="card-body" t-if="payment_tx_id.acquirer_id.journal_id.bank_account_id.qr_code_valid">
|
||||
<h3>Or scan me with your banking app.</h3>
|
||||
<img class="border border-dark rounded" t-att-src="payment_tx_id.acquirer_id.journal_id.bank_account_id.build_qr_code_url(order.amount_total,payment_tx_id.reference)"/>
|
||||
|
||||
Reference in New Issue
Block a user