bank-payment/account_payment_partner/views/report_invoice.xml

38 lines
1.8 KiB
XML
Raw Normal View History

2021-03-12 16:21:19 +00:00
<?xml version="1.0" encoding="utf-8" ?>
<flectra>
<template
id="report_invoice_payment_mode"
inherit_id="account.report_invoice_document"
>
<xpath expr="//p[@t-if='o.invoice_payment_term_id']" position="after">
<p t-if="o.payment_mode_id.note">
<strong>Payment Mode:</strong>
<span t-field="o.payment_mode_id.note" />
</p>
<t t-if="o.payment_mode_id and o.payment_mode_id.show_bank_account != 'no'">
2021-12-12 03:12:37 +00:00
<p t-foreach="o.sudo().partner_banks_to_show()" t-as="partner_bank">
2021-03-12 16:21:19 +00:00
<strong>Bank Account:</strong>
<t t-if="partner_bank.bank_id">
<t
t-esc="partner_bank.bank_id.name + ('' if not partner_bank.bank_id.bic else ' (' + partner_bank.bank_id.bic + ')')"
/>
</t>
<t t-if="o.payment_mode_id.show_bank_account == 'full'">
<span t-field="partner_bank.acc_number" />
</t>
<t t-elif="o.payment_mode_id.show_bank_account == 'first'">
<span
t-esc="partner_bank.acc_number[:o.payment_mode_id.show_bank_account_chars] + '*' * (len(partner_bank.acc_number) - o.payment_mode_id.show_bank_account_chars)"
/>
</t>
<t t-elif="o.payment_mode_id.show_bank_account == 'last'">
<span
t-esc="'*' * (len(partner_bank.acc_number) - o.payment_mode_id.show_bank_account_chars) + partner_bank.acc_number[-o.payment_mode_id.show_bank_account_chars:]"
/>
</t>
</p>
</t>
</xpath>
</template>
</flectra>