Commit 8dce8c47 authored by Sebastien Robin's avatar Sebastien Robin

again add bad movement groups


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@4404 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent cb67998e
......@@ -825,3 +825,49 @@ class DecisionMovementGroup(RootMovementGroup):
allow_class(DecisionMovementGroup)
# XXX This should not be here
# I (seb) have commited this because movement groups are not
# yet configurable through the zope web interface
class BrandMovementGroup(RootMovementGroup):
def getBrand(self,movement):
return movement.getBrand()
def __init__(self,movement,**kw):
RootMovementGroup.__init__(self, movement=movement, **kw)
brand = self.getBrand(movement)
self.brand = brand
self.setGroupEdit(
brand=brand
)
def test(self,movement):
if self.getBrand(movement) == self.brand :
return 1
else :
return 0
allow_class(BrandMovementGroup)
class AggregateMovementGroup(RootMovementGroup):
def getAggregateList(self,movement):
aggregate_list = movement.getAggregateList()
aggregate_list.sort()
return aggregate_list
def __init__(self,movement,**kw):
RootMovementGroup.__init__(self, movement=movement, **kw)
aggregate = self.getAggregateList(movement)
self.aggregate = aggregate
self.setGroupEdit(
aggregate=aggregate
)
def test(self,movement):
if self.getAggregate(movement) == self.aggregate :
return 1
else :
return 0
allow_class(BrandMovementGroup)
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