Commit cbd6b899 authored by Rafael Monnerat's avatar Rafael Monnerat

Added RequirementMovementGroup.



git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@10527 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 3e690c8c
......@@ -1068,3 +1068,26 @@ class SourceProjectMovementGroup(PropertyMovementGroup):
_property = 'source_project'
allow_class(SourceProjectMovementGroup)
class RequirementMovementGroup(RootMovementGroup):
"""
Group movements that have same Requirement.
"""
def getRequirementList(self,movement):
order_value = movement.getOrderValue()
requirement_list = []
if order_value is not None:
if "Line" in order_value.getPortalType():
requirement_list = order_value.getRequirementList()
return requirement_list
def __init__(self,movement,**kw):
RootMovementGroup.__init__(self, movement=movement, **kw)
requirement_list = self.getRequirementList(movement)
self.requirement_list = requirement_list
self.setGroupEdit(
requirement=requirement_list
)
def test(self,movement):
return self.getRequirementList(movement) == self.requirement_list
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