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
'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'])
]