Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
E
erp5_workflow
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
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wenjie.zheng
erp5_workflow
Commits
4be29c82
Commit
4be29c82
authored
Jun 10, 2015
by
wenjie.zheng
Committed by
Sebastien Robin
Jul 16, 2015
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
WorkflowTool.py: convert workflow with description now.
parent
b7b24136
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
0 deletions
+5
-0
product/ERP5/Tool/WorkflowTool.py
product/ERP5/Tool/WorkflowTool.py
+5
-0
No files found.
product/ERP5/Tool/WorkflowTool.py
View file @
4be29c82
...
...
@@ -323,6 +323,7 @@ class WorkflowTool(BaseTool, OriginalWorkflowTool):
transition
.
setActboxIcon
(
tdef
.
actbox_icon
)
transition
.
setActboxName
(
tdef
.
actbox_name
)
transition
.
setActboxUrl
(
tdef
.
actbox_url
)
transition
.
setDescription
(
tdef
.
description
)
if
tdef
.
after_script_name
is
not
None
:
# check after script is a Transion or a Script:
if
tdef
.
after_script_name
in
dc_workflow
.
transitions
.
objectIds
():
...
...
@@ -348,6 +349,7 @@ class WorkflowTool(BaseTool, OriginalWorkflowTool):
state
=
workflow
.
newContent
(
portal_type
=
'State'
,
temp_object
=
temp
)
state
.
edit
(
title
=
sdef
.
title
)
state
.
setReference
(
sdef
.
id
)
state
.
setDescription
(
sdef
.
description
)
permission_roles
=
sdef
.
permission_roles
state
.
setStatePermissionRoles
(
permission_roles
)
LOG
(
"permission_roles is '%s'"
%
permission_roles
,
WARNING
,
"in WorkflowTool.py"
)
...
...
@@ -394,6 +396,7 @@ class WorkflowTool(BaseTool, OriginalWorkflowTool):
worklist
=
workflow
.
newContent
(
portal_type
=
'Worklist'
,
temp_object
=
temp
)
worklist
.
edit
(
title
=
qdef
.
title
)
worklist
.
setReference
(
qdef
.
id
)
worklist
.
setDescription
(
qdef
.
description
)
for
key
,
values
in
qdef
.
var_matches
.
items
():
if
key
==
'portal_type'
:
worklist
.
setMatchedPortalTypeList
(
values
)
...
...
@@ -459,6 +462,7 @@ class WorkflowTool(BaseTool, OriginalWorkflowTool):
interaction
.
setTriggerMethodId
(
tdef
.
method_id
)
interaction
.
setTriggerOncePerTransaction
(
tdef
.
once_per_transaction
)
interaction
.
setTriggerType
(
tdef
.
trigger_type
)
interaction
.
setDescription
(
tdef
.
description
)
# create scripts (portal_type = Workflow Script)
for
script_id
in
dc_workflow
.
scripts
:
...
...
@@ -485,6 +489,7 @@ class WorkflowTool(BaseTool, OriginalWorkflowTool):
variable
.
setForCatalog
(
vdef
.
for_catalog
)
variable
.
setForStatus
(
vdef
.
for_status
)
variable
.
setInitialValue
(
vdef
.
default_value
)
variable
.
setDescription
(
vdef
.
description
)
return
workflow
def
getChainDict
(
self
):
...
...
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