Commit b7077fe2 authored by Jérome Perrin's avatar Jérome Perrin

make getDeliveryValue work on dummy movements


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@16406 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 369090b2
...@@ -59,6 +59,10 @@ class DummyMovement(Movement): ...@@ -59,6 +59,10 @@ class DummyMovement(Movement):
, PropertySheet.ItemAggregation , PropertySheet.ItemAggregation
) )
def isAccountable(self):
"""Our dummy movement are always accountable."""
return getattr(self, 'is_accountable', 1)
def getSimulationState(self): def getSimulationState(self):
"""Directly returns a simulation state.""" """Directly returns a simulation state."""
return getattr(self, 'simulation_state', 'draft') return getattr(self, 'simulation_state', 'draft')
...@@ -67,7 +71,17 @@ class DummyMovement(Movement): ...@@ -67,7 +71,17 @@ class DummyMovement(Movement):
"""Directly sets a simulation state.""" """Directly sets a simulation state."""
self.simulation_state = state self.simulation_state = state
def isAccountable(self): def getCausalityState(self):
"""Our dummy movement are always accountable.""" """Directly returns a causality state."""
return getattr(self, 'is_accountable', 1) return getattr(self, 'simulation_state', 'draft')
def setCausalityState(self, state):
"""Directly sets a causality state."""
self.causality_state = state
def getDeliveryValue(self):
"""A dummy movement doesn't have a delivery relation, so return self as delivery.
"""
return self
5 6
\ No newline at end of file \ No newline at end of file
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