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
f6add244
Commit
f6add244
authored
Jun 15, 2015
by
wenjie.zheng
Committed by
Sebastien Robin
Jul 16, 2015
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
WorkflowTool.py: convert the interaction script with right structure.
parent
7c880735
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
20 additions
and
20 deletions
+20
-20
product/ERP5/Tool/WorkflowTool.py
product/ERP5/Tool/WorkflowTool.py
+20
-20
No files found.
product/ERP5/Tool/WorkflowTool.py
View file @
f6add244
...
...
@@ -435,26 +435,26 @@ class WorkflowTool(BaseTool, OriginalWorkflowTool):
LOG
(
"2.4 Convert interaction '%s' of workflow '%s'"
%
(
tdef
.
id
,
workflow
.
getTitle
()),
WARNING
,
' in WorkflowTool.py'
)
interaction
.
edit
(
title
=
tdef
.
title
)
interaction
.
setReference
(
tdef
.
id
)
if
tdef
.
activate_script_name
is
not
Non
e
:
if
tdef
.
activate_
script_name
in
dc_workflow
.
interactions
.
objectIds
():
interaction
.
setActivateScriptName
(
'interaction_'
+
tdef
.
activate_script_name
)
elif
tdef
.
activate_
script_name
in
dc_workflow
.
scripts
.
objectIds
():
interaction
.
setActivateScriptName
(
'script_'
+
tdef
.
activate_script_name
)
if
tdef
.
after_script_name
is
not
Non
e
:
if
tdef
.
after_
script_name
in
dc_workflow
.
interactions
.
objectIds
():
interaction
.
setAfterScriptName
(
'interaction_'
+
tdef
.
after_script_name
)
elif
tdef
.
after_
script_name
in
dc_workflow
.
scripts
.
objectIds
():
interaction
.
setAfterScriptName
(
'script_'
+
tdef
.
after_script_name
)
if
tdef
.
before_commit_script_name
is
not
Non
e
:
if
tdef
.
before_commit_
script_name
in
dc_workflow
.
interactions
.
objectIds
():
interaction
.
setBeforeCommitScriptName
(
'interaction_'
+
tdef
.
before_commit_script_name
)
elif
tdef
.
before_commit_
script_name
in
dc_workflow
.
scripts
.
objectIds
():
interaction
.
setBeforeCommitScriptName
(
'script_'
+
tdef
.
before_commit_script_name
)
if
tdef
.
script_name
is
not
Non
e
:
if
tdef
.
script_name
in
dc_workflow
.
interactions
.
objectIds
():
interaction
.
setBeforeScriptName
(
'interaction_'
+
tdef
.
script_name
)
elif
tdef
.
script_name
in
dc_workflow
.
scripts
.
objectIds
():
interaction
.
setBeforeScriptName
(
'script_'
+
tdef
.
script_name
)
for
script_name
in
tdef
.
activate_script_nam
e
:
if
script_name
in
dc_workflow
.
interactions
.
objectIds
():
interaction
.
setActivateScriptName
(
(
'interaction_'
+
script_name
,)
)
elif
script_name
in
dc_workflow
.
scripts
.
objectIds
():
interaction
.
setActivateScriptName
(
(
'script_'
+
script_name
,)
)
for
script_name
in
tdef
.
after_script_nam
e
:
if
script_name
in
dc_workflow
.
interactions
.
objectIds
():
interaction
.
setAfterScriptName
(
(
'interaction_'
+
script_name
,)
)
elif
script_name
in
dc_workflow
.
scripts
.
objectIds
():
interaction
.
setAfterScriptName
(
(
'script_'
+
script_name
,)
)
for
script_name
in
tdef
.
before_commit_script_nam
e
:
if
script_name
in
dc_workflow
.
interactions
.
objectIds
():
interaction
.
setBeforeCommitScriptName
(
(
'interaction_'
+
script_name
,)
)
elif
script_name
in
dc_workflow
.
scripts
.
objectIds
():
interaction
.
setBeforeCommitScriptName
(
(
'script_'
+
script_name
,)
)
for
script_name
in
tdef
.
script_nam
e
:
if
script_name
in
dc_workflow
.
interactions
.
objectIds
():
interaction
.
setBeforeScriptName
(
(
'interaction_'
+
script_name
,)
)
elif
script_name
in
dc_workflow
.
scripts
.
objectIds
():
interaction
.
setBeforeScriptName
(
(
'script_'
+
script_name
,)
)
# configure guard
if
tdef
.
guard
:
interaction
.
setRoleList
(
tdef
.
guard
.
roles
)
...
...
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