Commit 798c2e77 authored by Jean-Paul Smets's avatar Jean-Paul Smets

added getSimulationState to circumvent aq_dynamic problem in acquisition


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@2349 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 0c99a30c
......@@ -118,12 +118,3 @@ An order..."""
}
)
}
security.declareProtected(Permissions.AccessContentsInformation, 'getSimulationState')
def getSimulationState(self, id_only=1):
"""
Returns the current state in simulation
"""
portal_workflow = getToolByName(self, 'portal_workflow')
wf = portal_workflow.getWorkflowById('accounting_workflow')
return wf._getWorkflowStateOf(self, id_only=id_only )
......@@ -133,6 +133,14 @@ Une ligne tarifaire."""
# Multiple inheritance definition
updateRelatedContent = XMLMatrix.updateRelatedContent
# 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()
# Force in _edit to modify variation_base_category_list first
security.declarePrivate( '_edit' )
def _edit(self, REQUEST=None, force_update = 0, **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