[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:
parent
03e9a38a1d
commit
b0e4ff28e9
|
@ -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'])
|
||||
]
|
||||
|
||||
|
|
Loading…
Reference in New Issue