[FIX] payment: correctly trigger the constraints
The third parameter expects a list of field, not some random string. This made the constraints for the fields tagged with required_if_provider to be never checked. Closes #12458
This commit is contained in:
@@ -129,7 +129,7 @@ class PaymentAcquirer(osv.Model):
|
||||
return True
|
||||
|
||||
_constraints = [
|
||||
(_check_required_if_provider, 'Required fields not filled', ['required for this provider']),
|
||||
(_check_required_if_provider, 'Required fields not filled', []),
|
||||
]
|
||||
|
||||
@openerp.api.model
|
||||
|
||||
Reference in New Issue
Block a user