Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
erp5-Boxiang
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
Hamza
erp5-Boxiang
Commits
b7b24136
Commit
b7b24136
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: resolve transition, worklist and interaction guard issue.
parent
203e54b9
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
19 additions
and
4 deletions
+19
-4
product/ERP5/Tool/WorkflowTool.py
product/ERP5/Tool/WorkflowTool.py
+19
-4
No files found.
product/ERP5/Tool/WorkflowTool.py
View file @
b7b24136
...
...
@@ -335,7 +335,12 @@ class WorkflowTool(BaseTool, OriginalWorkflowTool):
transition
.
setBeforeScriptId
(
'transition_'
+
tdef
.
script_name
)
elif
tdef
.
script_name
in
dc_workflow
.
scripts
.
objectIds
():
transition
.
setBeforeScriptId
(
'script_'
+
tdef
.
script_name
)
transition
.
guard
=
tdef
.
guard
# configure guard
if
tdef
.
guard
:
transition
.
setRoleList
(
tdef
.
guard
.
roles
)
transition
.
setPermissionList
(
tdef
.
guard
.
permissions
)
transition
.
setGroupList
(
tdef
.
guard
.
groups
)
transition
.
setExpression
(
tdef
.
guard
.
expr
)
# create states (portal_type = State)
for
sid
in
dc_workflow
.
states
:
sdef
=
dc_workflow
.
states
.
get
(
sid
)
...
...
@@ -408,7 +413,12 @@ class WorkflowTool(BaseTool, OriginalWorkflowTool):
worklist
.
setActboxIcon
(
qdef
.
actbox_icon
)
worklist
.
setActboxName
(
qdef
.
actbox_name
)
worklist
.
setActboxUrl
(
qdef
.
actbox_url
)
worklist
.
guard
=
qdef
.
guard
# configure guard
if
qdef
.
guard
:
worklist
.
setRoleList
(
qdef
.
guard
.
roles
)
worklist
.
setPermissionList
(
qdef
.
guard
.
permissions
)
worklist
.
setGroupList
(
qdef
.
guard
.
groups
)
worklist
.
setExpression
(
qdef
.
guard
.
expr
)
else
:
for
tid
in
dc_workflow
.
interactions
:
interaction
=
workflow
.
newContent
(
portal_type
=
'Interaction'
,
temp_object
=
temp
)
...
...
@@ -436,7 +446,12 @@ class WorkflowTool(BaseTool, OriginalWorkflowTool):
interaction
.
setBeforeScriptName
(
'interaction_'
+
tdef
.
script_name
)
elif
tdef
.
script_name
in
dc_workflow
.
scripts
.
objectIds
():
interaction
.
setBeforeScriptName
(
'script_'
+
tdef
.
script_name
)
interaction
.
guard
=
tdef
.
guard
# configure guard
if
tdef
.
guard
:
interaction
.
setRoleList
(
tdef
.
guard
.
roles
)
interaction
.
setPermissionList
(
tdef
.
guard
.
permissions
)
interaction
.
setGroupList
(
tdef
.
guard
.
groups
)
interaction
.
setExpression
(
tdef
.
guard
.
expr
)
interaction
.
setPortalTypeFilter
(
tdef
.
portal_type_filter
)
interaction
.
setPortalTypeGroupFilter
(
tdef
.
portal_type_group_filter
)
interaction
.
setTemporaryDocumentDisallowed
(
tdef
.
temporary_document_disallowed
)
...
...
@@ -1334,4 +1349,4 @@ class ExclusionTuple(tuple):
It is not to be used outside of the scope of this document nor outside
of the scope of worklist criterion handling.
"""
pass
\ No newline at end of file
pass
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