Commit 63da4a37 authored by Sebastien Robin's avatar Sebastien Robin

added ColourMovementGroup


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@5861 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent c985b196
...@@ -321,7 +321,7 @@ class RootAppliedRuleCausalityMovementGroup(RootMovementGroup): ...@@ -321,7 +321,7 @@ class RootAppliedRuleCausalityMovementGroup(RootMovementGroup):
def test(self,movement): def test(self,movement):
return self._getExplanationRelativeUrl(movement) == self.explanation return self._getExplanationRelativeUrl(movement) == self.explanation
allow_class(CausalityMovementGroup) allow_class(RootAppliedRuleCausalityMovementGroup)
class PathMovementGroup(RootMovementGroup): class PathMovementGroup(RootMovementGroup):
""" Group movements that have the same source and the same destination.""" """ Group movements that have the same source and the same destination."""
...@@ -341,6 +341,17 @@ class PathMovementGroup(RootMovementGroup): ...@@ -341,6 +341,17 @@ class PathMovementGroup(RootMovementGroup):
allow_class(PathMovementGroup) allow_class(PathMovementGroup)
class ColourMovementGroup(RootMovementGroup):
""" Group movements that have the same source and the same destination."""
def __init__(self, movement, **kw):
RootMovementGroup.__init__(self, movement=movement, **kw)
self.colour = movement.getColour()
def test(self, movement):
return movement.getColour() == self.colour
allow_class(ColourMovementGroup)
class SectionPathMovementGroup(RootMovementGroup): class SectionPathMovementGroup(RootMovementGroup):
""" Groups movement that have the same source_section and """ Groups movement that have the same source_section and
destination_section.""" destination_section."""
......
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