Commit a65c3b2f authored by Romain Courteaud's avatar Romain Courteaud

Add SplitResourceMovementGroup.


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@8374 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent d3c843ab
...@@ -32,7 +32,7 @@ ...@@ -32,7 +32,7 @@
Define in this file all classes intended to group every kind of movement Define in this file all classes intended to group every kind of movement
""" """
from zLOG import LOG from zLOG import LOG, DEBUG
from Products.PythonScripts.Utility import allow_class from Products.PythonScripts.Utility import allow_class
class MovementRejected(Exception) : pass class MovementRejected(Exception) : pass
...@@ -497,6 +497,17 @@ class ResourceMovementGroup(RootMovementGroup): ...@@ -497,6 +497,17 @@ class ResourceMovementGroup(RootMovementGroup):
allow_class(ResourceMovementGroup) allow_class(ResourceMovementGroup)
class SplitResourceMovementGroup(RootMovementGroup):
def __init__(self, movement, **kw):
RootMovementGroup.__init__(self, movement=movement, **kw)
self.resource = movement.getResource()
def test(self, movement):
return movement.getResource() == self.resource
allow_class(SplitResourceMovementGroup)
class BaseVariantMovementGroup(RootMovementGroup): class BaseVariantMovementGroup(RootMovementGroup):
def __init__(self,movement,**kw): def __init__(self,movement,**kw):
......
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