details:   https://code.tryton.org/tryton/commit/0c1cc43ae957
branch:    default
user:      Cédric Krier <[email protected]>
date:      Mon Feb 16 10:48:14 2026 +0100
description:
        Support getting bank from BIC string
diffstat:

 modules/bank/bank.py |  3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diffs (13 lines):

diff -r 8cb523173e02 -r 0c1cc43ae957 modules/bank/bank.py
--- a/modules/bank/bank.py      Fri Feb 13 18:28:24 2026 +0100
+++ b/modules/bank/bank.py      Mon Feb 16 10:48:14 2026 +0100
@@ -68,7 +68,8 @@
         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)

Reply via email to