Commit 7326f7f3 authored by Fabien Morin's avatar Fabien Morin

add constraints on TradeModelLine :

  - trade_phase is mandatory
  - if category are defined on line, this line should contain cells


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@27998 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent b5de8e3b
No related merge requests found
......@@ -47,4 +47,19 @@ class TradeModelLineConstraint:
'base_category' : ('resource',),
'message_arity_not_in_range' : 'Service must be defined in lines',
},
{ 'id' : 'trade_phase',
'description' : 'Trade Phase must be defined',
'type' : 'CategoryMembershipArity',
'min_arity' : '1',
'max_arity' : '1',
'portal_type' : ( ),
'base_category' : ('trade_phase',),
'message_arity_not_in_range' : 'Trade Phase must be defined in lines',
},
{ 'id': 'cell_existence',
'description': 'If variation categories are define on Trade Model Line \
cell corresponding to this categories should exist too',
'base_id': 'movement',
'type': 'TradeModelLineCellConsistency',
},
)
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