From 8c36eefc6952d121a67a71bef7cb3aea7319b74c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9dric=20Krier?= Date: Mon, 16 Feb 2026 10:48:14 +0100 Subject: [PATCH] Support getting bank from BIC string --- modules/bank/bank.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/modules/bank/bank.py b/modules/bank/bank.py index 9b8d08c88d..62c32883b4 100644 --- a/modules/bank/bank.py +++ b/modules/bank/bank.py @@ -68,7 +68,8 @@ class Bank(ModelSQL, ModelView): pool = Pool() Party = pool.get('party.party') if IBAN: - assert isinstance(bic, BIC) + if not isinstance(bic, BIC): + bic = BIC(bic) banks = cls.search([ ('bic', '=', bic.compact), ], limit=1)