[FIX] base_iban: IBAN constraint trigger

Make sure the constraint on IBAN format is checked when either the state or the account number is changed.
'iban' field was not modified so the check never triggered and could enter invalid IBAN
Fixes #3426
This commit is contained in:
Alexis de Lattre 2014-10-31 22:33:58 +01:00 committed by Martin Trigaux
parent 03e9a38a1d
commit b0e4ff28e9
1 changed files with 1 additions and 1 deletions

View File

@ -177,7 +177,7 @@ class res_partner_bank(osv.osv):
'iban': fields.related('acc_number', string='IBAN', size=34, readonly=True, help="International Bank Account Number", type="char"),
}
_constraints = [
(check_iban, _construct_constraint_msg, ["iban"]),
(check_iban, _construct_constraint_msg, ["iban", "acc_number", "state"]),
(_check_bank, '\nPlease define BIC/Swift code on bank for bank type IBAN Account to make valid payments', ['bic'])
]