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
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Hardik Juneja
erp5
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):
...
@@ -323,6 +323,7 @@ class WorkflowTool(BaseTool, OriginalWorkflowTool):
transition
.
setActboxIcon
(
tdef
.
actbox_icon
)
transition
.
setActboxIcon
(
tdef
.
actbox_icon
)
transition
.
setActboxName
(
tdef
.
actbox_name
)
transition
.
setActboxName
(
tdef
.
actbox_name
)
transition
.
setActboxUrl
(
tdef
.
actbox_url
)
transition
.
setActboxUrl
(
tdef
.
actbox_url
)
transition
.
setDescription
(
tdef
.
description
)
if
tdef
.
after_script_name
is
not
None
:
if
tdef
.
after_script_name
is
not
None
:
# check after script is a Transion or a Script:
# check after script is a Transion or a Script:
if
tdef
.
after_script_name
in
dc_workflow
.
transitions
.
objectIds
():
if
tdef
.
after_script_name
in
dc_workflow
.
transitions
.
objectIds
():
...
@@ -348,6 +349,7 @@ class WorkflowTool(BaseTool, OriginalWorkflowTool):
...
@@ -348,6 +349,7 @@ class WorkflowTool(BaseTool, OriginalWorkflowTool):
state
=
workflow
.
newContent
(
portal_type
=
'State'
,
temp_object
=
temp
)
state
=
workflow
.
newContent
(
portal_type
=
'State'
,
temp_object
=
temp
)
state
.
edit
(
title
=
sdef
.
title
)
state
.
edit
(
title
=
sdef
.
title
)
state
.
setReference
(
sdef
.
id
)
state
.
setReference
(
sdef
.
id
)
state
.
setDescription
(
sdef
.
description
)
permission_roles
=
sdef
.
permission_roles
permission_roles
=
sdef
.
permission_roles
state
.
setStatePermissionRoles
(
permission_roles
)
state
.
setStatePermissionRoles
(
permission_roles
)
LOG
(
"permission_roles is '%s'"
%
permission_roles
,
WARNING
,
"in WorkflowTool.py"
)
LOG
(
"permission_roles is '%s'"
%
permission_roles
,
WARNING
,
"in WorkflowTool.py"
)
...
@@ -394,6 +396,7 @@ class WorkflowTool(BaseTool, OriginalWorkflowTool):
...
@@ -394,6 +396,7 @@ class WorkflowTool(BaseTool, OriginalWorkflowTool):
worklist
=
workflow
.
newContent
(
portal_type
=
'Worklist'
,
temp_object
=
temp
)
worklist
=
workflow
.
newContent
(
portal_type
=
'Worklist'
,
temp_object
=
temp
)
worklist
.
edit
(
title
=
qdef
.
title
)
worklist
.
edit
(
title
=
qdef
.
title
)
worklist
.
setReference
(
qdef
.
id
)
worklist
.
setReference
(
qdef
.
id
)
worklist
.
setDescription
(
qdef
.
description
)
for
key
,
values
in
qdef
.
var_matches
.
items
():
for
key
,
values
in
qdef
.
var_matches
.
items
():
if
key
==
'portal_type'
:
if
key
==
'portal_type'
:
worklist
.
setMatchedPortalTypeList
(
values
)
worklist
.
setMatchedPortalTypeList
(
values
)
...
@@ -459,6 +462,7 @@ class WorkflowTool(BaseTool, OriginalWorkflowTool):
...
@@ -459,6 +462,7 @@ class WorkflowTool(BaseTool, OriginalWorkflowTool):
interaction
.
setTriggerMethodId
(
tdef
.
method_id
)
interaction
.
setTriggerMethodId
(
tdef
.
method_id
)
interaction
.
setTriggerOncePerTransaction
(
tdef
.
once_per_transaction
)
interaction
.
setTriggerOncePerTransaction
(
tdef
.
once_per_transaction
)
interaction
.
setTriggerType
(
tdef
.
trigger_type
)
interaction
.
setTriggerType
(
tdef
.
trigger_type
)
interaction
.
setDescription
(
tdef
.
description
)
# create scripts (portal_type = Workflow Script)
# create scripts (portal_type = Workflow Script)
for
script_id
in
dc_workflow
.
scripts
:
for
script_id
in
dc_workflow
.
scripts
:
...
@@ -485,6 +489,7 @@ class WorkflowTool(BaseTool, OriginalWorkflowTool):
...
@@ -485,6 +489,7 @@ class WorkflowTool(BaseTool, OriginalWorkflowTool):
variable
.
setForCatalog
(
vdef
.
for_catalog
)
variable
.
setForCatalog
(
vdef
.
for_catalog
)
variable
.
setForStatus
(
vdef
.
for_status
)
variable
.
setForStatus
(
vdef
.
for_status
)
variable
.
setInitialValue
(
vdef
.
default_value
)
variable
.
setInitialValue
(
vdef
.
default_value
)
variable
.
setDescription
(
vdef
.
description
)
return
workflow
return
workflow
def
getChainDict
(
self
):
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