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.""" ...@@ -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' ) security.declareProtected( Permissions.ModifyPortalContent, 'hasCellContent' )
def hasCellContent(self, base_id='movement'): def hasCellContent(self, base_id='movement'):
""" """
...@@ -319,9 +329,9 @@ Une ligne tarifaire.""" ...@@ -319,9 +329,9 @@ Une ligne tarifaire."""
if self.getSimulationState() in self.getPortalCurrentInventoryStateList(): if self.getSimulationState() in self.getPortalCurrentInventoryStateList():
# When an order is delivered, the target quantity should be considered # When an order is delivered, the target quantity should be considered
# rather than the quantity # rather than the quantity
return Movement.getTargetStartDate(self) return self._baseGetTargetStartDate(self)
else: else:
return Movement.getStartDate(self) return self._baseGetStartDate(self)
security.declareProtected(Permissions.AccessContentsInformation, 'getStopDate') security.declareProtected(Permissions.AccessContentsInformation, 'getStopDate')
def getStopDate(self): def getStopDate(self):
...@@ -331,9 +341,9 @@ Une ligne tarifaire.""" ...@@ -331,9 +341,9 @@ Une ligne tarifaire."""
if self.getSimulationState() in self.getPortalCurrentInventoryStateList(): if self.getSimulationState() in self.getPortalCurrentInventoryStateList():
# When an order is delivered, the target quantity should be considered # When an order is delivered, the target quantity should be considered
# rather than the quantity # rather than the quantity
return Movement.getTargetStopDate(self) return self._baseGetTargetStopDate(self)
else: else:
return Movement.getStopDate(self) return self._baseGetStopDate(self)
security.declareProtected(Permissions.AccessContentsInformation, 'getStopDate') security.declareProtected(Permissions.AccessContentsInformation, 'getStopDate')
def getRootDeliveryValue(self): 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