[FIX] l10n_it_edi: empty payment reference error
When the payment reference on an invoice is empty an error occurs when trying to generate the edi xml. The error comes from trying to retrieve a slice on a bool. To solve this, a t-if has been added in this commit, such that the function is not called when the field is empty. closes odoo/odoo#97151 X-original-commit: 67616aac66a0b7895dfad80d825ecff7b4cd75b1 Signed-off-by: Josse Colpaert <jco@odoo.com> Signed-off-by: Daniel Kosky (dako) <dako@odoo.com>
This commit is contained in:
@@ -176,7 +176,7 @@
|
||||
<IstitutoFinanziario t-if="partner_bank.bank_id" t-esc="format_alphanumeric(partner_bank.bank_id.name[:80])"/>
|
||||
<IBAN t-if="partner_bank.acc_type == 'iban'" t-esc="partner_bank.sanitized_acc_number"/>
|
||||
<BIC t-elif="partner_bank.acc_type == 'bank' and partner_bank.bank_id.bic" t-esc="partner_bank.bank_id.bic"/>
|
||||
<CodicePagamento t-esc="format_alphanumeric(record.payment_reference[:60])"/>
|
||||
<CodicePagamento t-if="record.payment_reference" t-esc="format_alphanumeric(record.payment_reference[:60])"/>
|
||||
</DettaglioPagamento>
|
||||
</t>
|
||||
</DatiPagamento>
|
||||
|
||||
Reference in New Issue
Block a user