Commit 5c07b3db authored by Sebastien Robin's avatar Sebastien Robin

added Decision Movement Group


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@4193 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 1d4c303e
......@@ -778,7 +778,7 @@ class IntIndexMovementGroup(RootMovementGroup):
def getIntIndex(self,movement):
order_value = movement.getOrderValue()
int_index = 0
if order is not None:
if order_value is not None:
if "Line" in order_value.getPortalType():
int_index = order_value.getIntIndex()
elif "Cell" in order_value.getPortalType():
......@@ -794,10 +794,34 @@ class IntIndexMovementGroup(RootMovementGroup):
)
def test(self,movement):
int_index = self.getIntIndex(movement)
if self.getIntIndex(movement) == self.int_index :
return 1
else :
return 0
allow_class(IntIndexMovementGroup)
# XXX This should not be here
# I (seb) have commited this because movement groups are not
# yet configurable through the zope web interface
class DecisionMovementGroup(RootMovementGroup):
def getDecision(self,movement):
return movement.getDecision()
def __init__(self,movement,**kw):
RootMovementGroup.__init__(self, movement=movement, **kw)
decision = self.getDecision(movement)
self.decision = decision
self.setGroupEdit(
decision=decision
)
def test(self,movement):
if self.getDecision(movement) == self.decision :
return 1
else :
return 0
allow_class(DecisionMovementGroup)
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