Add missing error message when no bank account is found when parsing UBL invoice

Closes #14938
This commit is contained in:
Cédric Krier
2026-07-08 08:54:37 +02:00
parent fca02700e9
commit 0839c83a2f
2 changed files with 7 additions and 2 deletions
+3 -2
View File
@@ -1357,8 +1357,9 @@ class Invoice_Bank(metaclass=PoolMeta):
financial_account, party)
account.save()
else:
raise InvoiceError(gettext(
'edocument_ubl.msg_account_not_found',
raise InvoiceError(ngettext(
'edocument_ubl.msg_bank_account_not_found',
len(payees),
parties=','.join([p.rec_name for p in payees]),
account=etree.tostring(
financial_account,
+4
View File
@@ -24,5 +24,9 @@ this repository contains the full copyright notices and license terms. -->
<field name="text">Could not find tax for:
%(tax_category)s</field>
</record>
<record model="ir.message" id="msg_bank_account_not_found">
<field name="text">Could not find bank account "%(account)s" for party "%(parties)s".</field>
<field name="text_plural">Could not find bank account "%(account)s" for any of the parties "%(parties)s".</field>
</record>
</data>
</tryton>