[ADD] Allow for multiple SEPA payment methods with different versions (#493) (#497)

This commit is contained in:
Stefan Rijnhart (Opener)
2018-07-25 18:02:37 +02:00
committed by Pedro M. Baeza
parent 8901b85ad6
commit 783261733d

View File

@@ -21,3 +21,11 @@ class AccountPaymentMethod(models.Model):
self.ensure_one()
raise UserError(_(
"No XSD file path found for payment method '%s'") % self.name)
_sql_constraints = [(
# Extending this constraint from account_payment_mode
'code_payment_type_unique',
'unique(code, payment_type, pain_version)',
'A payment method of the same type already exists with this code'
' and PAIN version'
)]