Commit a8534958 authored by iv's avatar iv

ERP5Workflow: remove getParentWorkflowValue to use getParentValue method

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