diff --git a/product/ERP5/MovementGroup.py b/product/ERP5/MovementGroup.py index 13d3e0ebcd26149e66dd924b49210c3cbfc836fa..3cf5ad720a5f4f4530e0e31ec006aa5f87ae1749 100644 --- a/product/ERP5/MovementGroup.py +++ b/product/ERP5/MovementGroup.py @@ -624,9 +624,17 @@ class PropertyMovementGroup(RootMovementGroup): return self._property_dict[self._property] == \ movement.getProperty(self._property) -class ResourceMovementGroup(PropertyMovementGroup): +class ResourceMovementGroup(RootMovementGroup): """ Group movements that have the same resource. """ - _property = 'resource' + def __init__(self, movement, **kw): + RootMovementGroup.__init__(self, movement=movement, **kw) + self.resource = movement.getResource() + self.setGroupEdit( + resource_value=movement.getResourceValue() + ) + + def test(self, movement): + return movement.getResource() == self.resource allow_class(ResourceMovementGroup)