Commit 606f6f3a authored by Rafael Monnerat's avatar Rafael Monnerat

Added new movement group DecisionPathMovementGroup.



git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@20929 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 49f24b8b
...@@ -474,6 +474,31 @@ class AdministrationPathMovementGroup(RootMovementGroup): ...@@ -474,6 +474,31 @@ class AdministrationPathMovementGroup(RootMovementGroup):
return source_administration_list == self.source_administration_list and \ return source_administration_list == self.source_administration_list and \
destination_administration_list == self.destination_administration_list destination_administration_list == self.destination_administration_list
class DecisionPathMovementGroup(RootMovementGroup):
""" Groups movement that have the same source_decision and
destination_decision."""
def __init__(self, movement, **kw):
RootMovementGroup.__init__(self, movement=movement, **kw)
source_decision_list = movement.getSourceDecisionList()
destination_decision_list = movement.getDestinationDecisionList()
source_decision_list.sort() ; destination_decision_list.sort()
self.source_decision_list = source_decision_list
self.destination_decision_list = destination_decision_list
self.setGroupEdit(
source_decision_list=source_decision_list,
destination_decision_list=destination_decision_list
)
def test(self, movement):
source_decision_list = movement.getSourceDecisionList()
destination_decision_list = movement.getDestinationDecisionList()
source_decision_list.sort() ; destination_decision_list.sort()
return source_decision_list == self.source_decision_list and \
destination_decision_list == self.destination_decision_list
class TradePathMovementGroup(RootMovementGroup): class TradePathMovementGroup(RootMovementGroup):
""" """
Group movements that have the same source_trade and the same Group movements that have the same source_trade and the same
......
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