details:   https://code.tryton.org/tryton/commit/7fb4233bd464
branch:    8.0
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
        (grafted from f26f207f98cf5a0df67124e5677db5b848d52cf5)
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 04622ae5f782 -r 7fb4233bd464 modules/edocument_ubl/edocument.py
--- a/modules/edocument_ubl/edocument.py        Wed Jul 08 09:19:35 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 04622ae5f782 -r 7fb4233bd464 modules/edocument_ubl/message.xml
--- a/modules/edocument_ubl/message.xml Wed Jul 08 09:19:35 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>

Reply via email to