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

erp5_workflow: rename chain_by_type repair script; add a type check in convertion workflow.

parent d5ebc15e
...@@ -89,10 +89,10 @@ for dc_wf in selected_wf_list:\n ...@@ -89,10 +89,10 @@ for dc_wf in selected_wf_list:\n
\n \n
type_workflow_dict = context.getChainsByType()\n type_workflow_dict = context.getChainsByType()\n
for ptype_id in type_workflow_dict:\n for ptype_id in type_workflow_dict:\n
ptype = getattr(context.getPortalObject().portal_types, ptype_id)\n ptype = getattr(context.getPortalObject().portal_types, ptype_id, None)\n
if ptype is not None:\n
# 1. clean DC workflow assignement:\n # 1. clean DC workflow assignement:\n
context.delTypeCBT(ptype.id, dc_wf.id)\n context.delTypeCBT(ptype.id, dc_wf.id)\n
\n
# 2. assign ERP5 Workflow to portal type:\n # 2. assign ERP5 Workflow to portal type:\n
type_workflow_list = ptype.getTypeWorkflowList()\n type_workflow_list = ptype.getTypeWorkflowList()\n
if workflow.getId() not in type_workflow_list:\n if workflow.getId() not in type_workflow_list:\n
......
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