Use static selection for identifier type
issue6374 review34781002
This commit is contained in:
1 parent
33b31dc263
commit
39cfa7fee5
1 file changed
+1
-6
@@ -59,6 +59,7 @@ class PartyIdentifier:
|
||||
@classmethod
|
||||
def __setup__(cls):
|
||||
super(PartyIdentifier, cls).__setup__()
|
||||
cls.type.selection.append(('sepa', 'SEPA Creditor Identifier'))
|
||||
cls._error_messages.update({
|
||||
'unique_sepa': ('Party "%(party)s" has more than one '
|
||||
'SEPA Creditor Identifier.'),
|
||||
@@ -66,12 +67,6 @@ class PartyIdentifier:
|
||||
'"%(party)s" is not valid.'),
|
||||
})
|
||||
|
||||
@classmethod
|
||||
def get_types(cls):
|
||||
return super(PartyIdentifier, cls).get_types() + [
|
||||
('sepa', 'SEPA Creditor Identifier'),
|
||||
]
|
||||
|
||||
def check_code(self):
|
||||
super(PartyIdentifier, self).check_code()
|
||||
if self.type == 'sepa':
|
||||
|
||||
Reference in new issue
Block a user