Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
erp5
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Amer
erp5
Commits
c9fe4aa8
Commit
c9fe4aa8
authored
Jun 08, 2015
by
wenjie.zheng
Committed by
Sebastien Robin
Jul 16, 2015
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
erp5_workflow: finish the function of reassignment of converted workflow.
parent
5db81783
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
10 deletions
+6
-10
bt5/erp5_workflow/SkinTemplateItem/portal_skins/erp5_workflow/WorkflowTool_convertWorkflow.xml
...rtal_skins/erp5_workflow/WorkflowTool_convertWorkflow.xml
+6
-10
No files found.
bt5/erp5_workflow/SkinTemplateItem/portal_skins/erp5_workflow/WorkflowTool_convertWorkflow.xml
View file @
c9fe4aa8
...
...
@@ -87,21 +87,17 @@ for dc_wf in selected_wf_list:\n
workflow = context.dc_workflow_asERP5Object(context, dc_wf, temp=0)\n
selected_wf_id_list.append(dc_wf.id)\n
\n
"""\n
# reassign workflow to portal types\n
\n
for ptype in context.getPortalObject().portal_types.objectValues():\n
dc_wf_chain = []
\n
\n
# 1. clean DC workflow assignement:\n
dc_wf_chain.append(context.getTypeCBT(ptype.id))\n
if dc_workflow_id in dc_wf_chain:\n
context.delTypeCBT(ptype.id, dc_workflow_id)\n
context.delTypeCBT(ptype.id, dc_wf.id)\n
\n
# 2. assign
new workflow to the portal_
type:\n
# 2. assign
ERP5 Workflow to portal
type:\n
type_erp5workflow_list = ptype.getTypeERP5WorkflowList()\n
if w
f_id
not in type_erp5workflow_list:\n
type_erp5workflow_list.append(w
f_id
)\n
if w
orkflow.getId()
not in type_erp5workflow_list:\n
type_erp5workflow_list.append(w
orkflow.getId()
)\n
ptype.edit(type_erp5workflow_list=type_erp5workflow_list)\n
"""\n
\n
return RESPONSE.redirect("%s/view?portal_status_message=Workflow+%s+converted"\n
%(context.absolute_url(), \',+\'.join(selected_wf_id_list)))\n
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment