Commit b4ddc126 authored by Sebastien Robin's avatar Sebastien Robin

we must set the workflow id


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@2186 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent e808ef86
......@@ -30,14 +30,14 @@ from Products.DCWorkflow.Expression import StateChangeInfo
from Products.PythonScripts.Utility import allow_class
allow_class(StateChangeInfo)
def setWorkflowVariable(self, object, **kw):
def setWorkflowVariable(self, object, workflow_id='edit_workflow',**kw):
"""
Allows to go through security checking and let a
script allows to modify a workflow variable
"""
workflow_history = object.workflow_history
for workflow in workflow_history.keys():
if len(workflow_history[workflow])!= 0:
if len(workflow_history[workflow])!= 0 and workflow==workflow_id:
last_status = workflow_history[workflow][len(workflow_history[workflow])-1]
for variable in kw.keys():
if last_status.has_key(variable):
......
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