details: https://code.tryton.org/tryton/commit/f26f207f98cf
branch: default
user: Cédric Krier <[email protected]>
date: Wed Jul 08 08:54:37 2026 +0200
description:
Add missing error message when no bank account is found when parsing
UBL invoice
Closes #14938
diffstat:
modules/edocument_ubl/edocument.py | 5 +++--
modules/edocument_ubl/message.xml | 4 ++++
2 files changed, 7 insertions(+), 2 deletions(-)
diffs (28 lines):
diff -r b7d6bfe71a7f -r f26f207f98cf modules/edocument_ubl/edocument.py
--- a/modules/edocument_ubl/edocument.py Tue Jul 07 19:16:08 2026 +0200
+++ b/modules/edocument_ubl/edocument.py Wed Jul 08 08:54:37 2026 +0200
@@ -1357,8 +1357,9 @@
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,
diff -r b7d6bfe71a7f -r f26f207f98cf modules/edocument_ubl/message.xml
--- a/modules/edocument_ubl/message.xml Tue Jul 07 19:16:08 2026 +0200
+++ b/modules/edocument_ubl/message.xml Wed Jul 08 08:54:37 2026 +0200
@@ -24,5 +24,9 @@
<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>