Commit da6a2192 authored by iv's avatar iv

ERP5Workflow: fix Variable->Workflow Variable (introduced by 8508196f)

parent 204eac65
...@@ -44,7 +44,7 @@ for v, property_dict in ( ...@@ -44,7 +44,7 @@ for v, property_dict in (
'for_catalog': 1, 'for_catalog': 1,
}), }),
): ):
variable = context.newContent(portal_type='Variable') variable = context.newContent(portal_type='Workflow Variable')
variable.setReference(v) variable.setReference(v)
variable.edit(**property_dict) variable.edit(**property_dict)
context.setStateVariable('simulation_state') context.setStateVariable('simulation_state')
...@@ -531,6 +531,7 @@ class WorkflowTool(BaseTool, OriginalWorkflowTool): ...@@ -531,6 +531,7 @@ class WorkflowTool(BaseTool, OriginalWorkflowTool):
var_exprs = {} var_exprs = {}
else: var_exprs = origin_tdef.var_exprs else: var_exprs = origin_tdef.var_exprs
for key in var_exprs: for key in var_exprs:
#import pdb; pdb.set_trace()
tr_var = transition.newContent(portal_type='Transition Variable', temp_object=is_temporary) tr_var = transition.newContent(portal_type='Transition Variable', temp_object=is_temporary)
tr_var.setVariableExpression(var_exprs[key].text) tr_var.setVariableExpression(var_exprs[key].text)
tr_var_path = getattr(workflow, 'variable_'+key).getPath() tr_var_path = getattr(workflow, 'variable_'+key).getPath()
......
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