Commit bc6ae22b authored by iv's avatar iv

ERP5Workflow: remove getParentWorkflowValue to use getParentValue method

parent bfe4d8c0
...@@ -210,7 +210,7 @@ def getPossibleWorkflowActionItemList(self, brain, **kw): ...@@ -210,7 +210,7 @@ def getPossibleWorkflowActionItemList(self, brain, **kw):
for action in portal.portal_actions.listFilteredActionsFor(brain).get('workflow', []): for action in portal.portal_actions.listFilteredActionsFor(brain).get('workflow', []):
transition = action.get('transition', None) transition = action.get('transition', None)
if transition is not None: if transition is not None:
workflow_id = action['transition'].getParentWorkflowValue().getId() workflow_id = action['transition'].getParentValue().getId()
if workflow_id == brain.workflow_id: if workflow_id == brain.workflow_id:
dialog_id = action['url'].split('?', 1)[0].split('/')[-1] dialog_id = action['url'].split('?', 1)[0].split('/')[-1]
dialog_object = getattr(portal, dialog_id, None) dialog_object = getattr(portal, dialog_id, None)
......
...@@ -1070,7 +1070,7 @@ def DCWorkflowDefinition_showAsXML(self, root=None): ...@@ -1070,7 +1070,7 @@ def DCWorkflowDefinition_showAsXML(self, root=None):
return etree.tostring(root, encoding='utf-8', return etree.tostring(root, encoding='utf-8',
xml_declaration=True, pretty_print=True) xml_declaration=True, pretty_print=True)
def TransitionDefinition_getParentWorkflowValue(self): def TransitionDefinition_getParentValue(self):
return self.aq_parent.aq_parent return self.aq_parent.aq_parent
def DCWorkflowDefinition_getSourceValue(self): def DCWorkflowDefinition_getSourceValue(self):
...@@ -1113,7 +1113,7 @@ StateDefinition.getReference = method_getReference ...@@ -1113,7 +1113,7 @@ StateDefinition.getReference = method_getReference
StateDefinition.getDestinationIdList = StateDefinition_getDestinationIdList StateDefinition.getDestinationIdList = StateDefinition_getDestinationIdList
StateDefinition.getDestinationReferenceList = StateDefinition_getDestinationIdList StateDefinition.getDestinationReferenceList = StateDefinition_getDestinationIdList
StateDefinition.showDict = DCWorkflowDefinition_showDict StateDefinition.showDict = DCWorkflowDefinition_showDict
TransitionDefinition.getParentWorkflowValue = TransitionDefinition_getParentWorkflowValue TransitionDefinition.getParentValue = TransitionDefinition_getParentValue
TransitionDefinition.getReference = method_getReference TransitionDefinition.getReference = method_getReference
TransitionDefinition.showDict = DCWorkflowDefinition_showDict TransitionDefinition.showDict = DCWorkflowDefinition_showDict
VariableDefinition.getReference = method_getReference VariableDefinition.getReference = method_getReference
......
...@@ -107,6 +107,3 @@ class Transition(IdAsReferenceMixin("transition_", "prefix"), XMLObject): ...@@ -107,6 +107,3 @@ class Transition(IdAsReferenceMixin("transition_", "prefix"), XMLObject):
self.guard.groups = self.getGroupList() self.guard.groups = self.getGroupList()
if self.getExpression() is not None: if self.getExpression() is not None:
self.guard.expr = Expression(self.getExpression()) self.guard.expr = Expression(self.getExpression())
def getParentWorkflowValue(self):
return self.getParent()
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