Commit 1fa70fa8 authored by Jérome Perrin's avatar Jérome Perrin

use CategoryExistence instead of CategoryMembershipArity with min_arity and no max_arity


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@18227 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 7efe448b
...@@ -46,19 +46,15 @@ class Account: ...@@ -46,19 +46,15 @@ class Account:
_constraints = ( _constraints = (
{ 'id': 'account_type_existance', { 'id': 'account_type_existance',
'description': 'Account Type must be set', 'description': 'Account Type must be set',
'type': 'CategoryMembershipArity', 'type': 'CategoryExistence',
'min_arity': 1, 'account_type' : 1,
'portal_type': ('Category', ),
'base_category' : ('account_type',),
'condition' : 'python: object.getValidationState() not' 'condition' : 'python: object.getValidationState() not'
' in ("invalidated", "deleted")' ' in ("invalidated", "deleted")'
}, },
{ 'id': 'gap_existance', { 'id': 'gap_existance',
'description': 'GAP must be set', 'description': 'GAP must be set',
'type': 'CategoryMembershipArity', 'type': 'CategoryExistence',
'min_arity': 1, 'gap' : 1,
'portal_type': ('Category', ),
'base_category' : ('gap',),
'condition' : 'python: object.getValidationState() not' 'condition' : 'python: object.getValidationState() not'
' in ("invalidated", "deleted")' ' in ("invalidated", "deleted")'
}, },
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment