mirror of
https://github.com/OCA/bank-payment.git
synced 2025-02-02 10:37:31 +02:00
Merge pull request #572 from TDu/fix-bic-constraint
[12.0][FIX] account_banking_pain_base bic constrains
This commit is contained in:
@@ -22,7 +22,7 @@ class ResBank(models.Model):
|
|||||||
:raise: ValidationError if the BIC doesn't respect the regex of the
|
:raise: ValidationError if the BIC doesn't respect the regex of the
|
||||||
SEPA pain schemas.
|
SEPA pain schemas.
|
||||||
"""
|
"""
|
||||||
invalid_banks = self.filtered(lambda r: not BIC_REGEX.match(r.bic))
|
invalid_banks = self.filtered(lambda r: r.bic and not BIC_REGEX.match(r.bic))
|
||||||
if invalid_banks:
|
if invalid_banks:
|
||||||
raise ValidationError(_(
|
raise ValidationError(_(
|
||||||
"The following Bank Identifier Codes (BIC) do not respect "
|
"The following Bank Identifier Codes (BIC) do not respect "
|
||||||
|
|||||||
Reference in New Issue
Block a user