Commit ef6822d7 authored by wenjie.zheng's avatar wenjie.zheng Committed by Sebastien Robin

ERP5/InteractionWorkflow.py: improve showAsXML according to workflow showASXML.

parent 2dcf0564
......@@ -454,17 +454,18 @@ class InteractionWorkflowDefinition (DCWorkflowDefinition, ActiveObject):
property_value = expression.text
else:
property_value = ''
sub_object = SubElement(variable, property_id, attrib=dict(type='string'))
else:
property_value = vdef.__dict__[property_id]
property_type = variable_prop_id_to_show[property_id]
sub_object = SubElement(variable, property_id, attrib=dict(type=property_type))
property_value = getattr(vdef, property_id, '')
if property_value is None or property_value == [] or property_value ==():
property_value = ''
property_type = variable_prop_id_to_show[property_id]
sub_object = SubElement(variable, property_id, attrib=dict(type=property_type))
sub_object.text = str(property_value)
# 3. Script as XML
script_reference_list = []
script_id_list = sorted(self.scripts.keys())
script_prop_id_to_show = {'title':'string', 'body':'string', 'parameter_signature':'string'}
script_prop_id_to_show = {'body':'string', 'parameter_signature':'string'}
for sid in script_id_list:
script_reference_list.append(sid)
scripts = SubElement(interaction_workflow, 'scripts', attrib=dict(script_list=str(script_reference_list),
......
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