[FIX] account_ebics - Explain missing journal in EBICS key initialisation

ebics_init_1 read journal_ids[0] before checking it, so a configuration
without journal raised an IndexError instead of the "No bank defined"
message.
This commit is contained in:
Jérémy Didderen authored and Didderen Jérémy committed 2026-11-08 23:46:00 +01:00
1 parent 7abbe675f5
commit f4f40a6fe2
1 file changed
+1 -2
+1 -2
View File
@@ -413,7 +413,7 @@ class EbicsUserID(models.Model):
raise UserError(error) from err
# Send the public electronic signature key to the bank.
ebics_config_bank = self.ebics_config_id.journal_ids[0].bank_id
ebics_config_bank = self.ebics_config_id.journal_ids[:1].bank_id
if not ebics_config_bank:
raise UserError(
self.env._(
@@ -471,7 +471,6 @@ class EbicsUserID(models.Model):
self.ebics_config_id._update_order_number(OrderID)
# Create an INI-letter which must be printed and sent to the bank.
ebics_config_bank = self.ebics_config_id.journal_ids[0].bank_id
cc = ebics_config_bank.country.code
if cc in ["FR", "DE"]:
lang = cc