[FIX] Fix issue when the bank_id of partner_bank_id is not set (field not mandatory) and create a traceback for the user

Use t-if
This commit is contained in:
François Honoré
2018-02-12 11:14:59 +01:00
committed by Pedro M. Baeza
parent 2a364ad32c
commit f989f92e37
2 changed files with 4 additions and 1 deletions

View File

@@ -5,7 +5,7 @@
{
'name': 'Account Payment Partner',
'version': '11.0.1.1.0',
'version': '11.0.1.2.0',
'category': 'Banking addons',
'license': 'AGPL-3',
'summary': 'Adds payment mode on partners and invoices',

View File

@@ -9,6 +9,9 @@
</p>
<p t-if="o.partner_bank_id">
<strong>Bank Account:</strong>
<t t-if="o.partner_bank_id.bank_id">
<t t-esc="o.partner_bank_id.bank_id.name + ('' if not o.partner_bank_id.bank_id.bic else ' (' + o.partner_bank_id.bank_id.bic + ')')" />
</t>
<span t-field="o.partner_bank_id.acc_number" />
</p>
</xpath>