Commit 0c99a30c authored by Jean-Paul Smets's avatar Jean-Paul Smets

added getSimulationState to circumvent aq_dynamic problem in acquisition

fixed aq_dynamic related inheritance issue


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@2348 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent f516c606
......@@ -129,6 +129,16 @@ Une ligne tarifaire."""
)
}
# Explicit acquisition of aq_dynamic generated method
security.declareProtected(Permissions.AccessContentsInformation, 'getSimulationState')
def getSimulationState(self):
"""
Explicitly acquire simulation_state from parent
"""
return self.aq_parent.getSimulationState()
# MatrixBox methods
security.declareProtected( Permissions.ModifyPortalContent, 'hasCellContent' )
def hasCellContent(self, base_id='movement'):
"""
......@@ -319,9 +329,9 @@ Une ligne tarifaire."""
if self.getSimulationState() in self.getPortalCurrentInventoryStateList():
# When an order is delivered, the target quantity should be considered
# rather than the quantity
return Movement.getTargetStartDate(self)
return self._baseGetTargetStartDate(self)
else:
return Movement.getStartDate(self)
return self._baseGetStartDate(self)
security.declareProtected(Permissions.AccessContentsInformation, 'getStopDate')
def getStopDate(self):
......@@ -331,9 +341,9 @@ Une ligne tarifaire."""
if self.getSimulationState() in self.getPortalCurrentInventoryStateList():
# When an order is delivered, the target quantity should be considered
# rather than the quantity
return Movement.getTargetStopDate(self)
return self._baseGetTargetStopDate(self)
else:
return Movement.getStopDate(self)
return self._baseGetStopDate(self)
security.declareProtected(Permissions.AccessContentsInformation, 'getStopDate')
def getRootDeliveryValue(self):
......
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