[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
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user