From 0839c83a2f2ec08becb52cdb68e6e3128f7b2fa4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9dric=20Krier?= Date: Wed, 8 Jul 2026 08:54:37 +0200 Subject: [PATCH] Add missing error message when no bank account is found when parsing UBL invoice Closes #14938 --- modules/edocument_ubl/edocument.py | 5 +++-- modules/edocument_ubl/message.xml | 4 ++++ 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/modules/edocument_ubl/edocument.py b/modules/edocument_ubl/edocument.py index 6944e8f648..d7cd90d923 100644 --- a/modules/edocument_ubl/edocument.py +++ b/modules/edocument_ubl/edocument.py @@ -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, diff --git a/modules/edocument_ubl/message.xml b/modules/edocument_ubl/message.xml index 77e6098eea..8881571a7d 100644 --- a/modules/edocument_ubl/message.xml +++ b/modules/edocument_ubl/message.xml @@ -24,5 +24,9 @@ this repository contains the full copyright notices and license terms. --> Could not find tax for: %(tax_category)s + + Could not find bank account "%(account)s" for party "%(parties)s". + Could not find bank account "%(account)s" for any of the parties "%(parties)s". +