Commit 834e7010 authored by wenjie.zheng's avatar wenjie.zheng

Workflow.py: do not compare title in showAsXML, because in some case DC...

Workflow.py: do not compare title in showAsXML, because in some case DC workflow's transition/ingeraction or state doesn't has title.
parent 8e18d032
...@@ -747,7 +747,7 @@ class Workflow(IdAsReferenceMixin("", "prefix"), XMLObject): ...@@ -747,7 +747,7 @@ class Workflow(IdAsReferenceMixin("", "prefix"), XMLObject):
return_as_object = False return_as_object = False
# Define a list of property to show to users: # Define a list of property to show to users:
workflow_prop_id_to_show = ['title', 'description', 'state_var', workflow_prop_id_to_show = ['description', 'state_var',
'permissions', 'initial_state'] 'permissions', 'initial_state']
# workflow as XML, need to rename DC workflow's portal_type before comparison. # workflow as XML, need to rename DC workflow's portal_type before comparison.
...@@ -782,7 +782,7 @@ class Workflow(IdAsReferenceMixin("", "prefix"), XMLObject): ...@@ -782,7 +782,7 @@ class Workflow(IdAsReferenceMixin("", "prefix"), XMLObject):
state_reference_list = [] state_reference_list = []
state_list = self.objectValues(portal_type='State') state_list = self.objectValues(portal_type='State')
# show reference instead of id # show reference instead of id
state_prop_id_to_show = ['title', 'description', state_prop_id_to_show = ['description',
'transitions', 'permission_roles'] 'transitions', 'permission_roles']
for sdef in state_list: for sdef in state_list:
state_reference_list.append(sdef.getReference()) state_reference_list.append(sdef.getReference())
...@@ -813,7 +813,7 @@ class Workflow(IdAsReferenceMixin("", "prefix"), XMLObject): ...@@ -813,7 +813,7 @@ class Workflow(IdAsReferenceMixin("", "prefix"), XMLObject):
# 2. Transition as XML # 2. Transition as XML
transition_reference_list = [] transition_reference_list = []
transition_list = self.objectValues(portal_type='Transition') transition_list = self.objectValues(portal_type='Transition')
transition_prop_id_to_show = ['title', 'description', 'new_state_id', transition_prop_id_to_show = ['description', 'new_state_id',
'trigger_type', 'script_name', 'after_script_name', 'actbox_category', 'trigger_type', 'script_name', 'after_script_name', 'actbox_category',
'actbox_icon', 'actbox_name', 'actbox_url', 'roles', 'groups', 'actbox_icon', 'actbox_name', 'actbox_url', 'roles', 'groups',
'permissions', 'expr', 'transition_variable'] 'permissions', 'expr', 'transition_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