From 2ebfffd28f83a9063d1c8282ba6d76b92818bf91 Mon Sep 17 00:00:00 2001 From: Arthur Maniet Date: Thu, 15 Oct 2015 15:54:33 +0200 Subject: [PATCH] [REM] IBAN: constraint that requires a BIC for an IBAN account It is not always possible to possess both the account number and the BIC at the time of creation. Eg. bank statement import where few file formats provide BIC --- addons/base_iban/base_iban.py | 6 ------ addons/base_iban/i18n/base_iban.pot | 6 ------ 2 files changed, 12 deletions(-) diff --git a/addons/base_iban/base_iban.py b/addons/base_iban/base_iban.py index c7d80f32705..8468fa12f67 100644 --- a/addons/base_iban/base_iban.py +++ b/addons/base_iban/base_iban.py @@ -75,12 +75,6 @@ class ResPartnerBank(models.Model): if self.acc_type == 'iban': validate_iban(self.acc_number) - @api.one - @api.constrains('acc_number', 'bank_bic') - def _check_bank_bic(self): - if self.acc_type == 'iban' and not self.bank_bic: - raise ValidationError(_("Please define BIC/Swift code on bank for bank type IBAN Account to make valid payments.")) - # Map ISO 3166-1 -> IBAN template, as described here : # http://en.wikipedia.org/wiki/International_Bank_Account_Number#IBAN_formats_by_country diff --git a/addons/base_iban/i18n/base_iban.pot b/addons/base_iban/i18n/base_iban.pot index b422652b842..5d2cb8f5d74 100644 --- a/addons/base_iban/i18n/base_iban.pot +++ b/addons/base_iban/i18n/base_iban.pot @@ -32,12 +32,6 @@ msgstr "" msgid "No IBAN !" msgstr "" -#. module: base_iban -#: code:addons/base_iban/base_iban.py:82 -#, python-format -msgid "Please define BIC/Swift code on bank for bank type IBAN Account to make valid payments." -msgstr "" - #. module: base_iban #: code:addons/base_iban/base_iban.py:34 #, python-format