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
ca677666
Commit
ca677666
authored
Jul 09, 2015
by
wenjie.zheng
Committed by
Sebastien Robin
Jul 16, 2015
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
patches/WorkflowTool.py: remove erp5 prefix.
parent
d3342c62
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
11 deletions
+6
-11
product/ERP5Type/patches/WorkflowTool.py
product/ERP5Type/patches/WorkflowTool.py
+6
-11
No files found.
product/ERP5Type/patches/WorkflowTool.py
View file @
ca677666
...
@@ -402,19 +402,13 @@ WorkflowTool._bootstrap = WorkflowTool_bootstrap
...
@@ -402,19 +402,13 @@ WorkflowTool._bootstrap = WorkflowTool_bootstrap
def
WorkflowTool_listActions
(
self
,
info
=
None
,
object
=
None
,
src__
=
False
):
def
WorkflowTool_listActions
(
self
,
info
=
None
,
object
=
None
,
src__
=
False
):
"""
"""
Returns a list of actions to be displayed to the user.
Returns a list of actions to be displayed to the user.
o Invoked by the portal_actions tool.
o Invoked by the portal_actions tool.
o Allows workflows to include actions to be displayed in the
o Allows workflows to include actions to be displayed in the
actions box.
actions box.
o Object actions are supplied by workflows that apply to the object.
o Object actions are supplied by workflows that apply to the object.
o Global actions are supplied by all workflows.
o Global actions are supplied by all workflows.
This patch attemps to make listGlobalActions aware of worklists,
This patch attemps to make listGlobalActions aware of worklists,
which allows factorizing them into one single SQL query.
which allows factorizing them into one single SQL query.
Related keys are supported.
Related keys are supported.
Warning: the worklist cache does not support them.
Warning: the worklist cache does not support them.
"""
"""
...
@@ -430,20 +424,20 @@ def WorkflowTool_listActions(self, info=None, object=None, src__=False):
...
@@ -430,20 +424,20 @@ def WorkflowTool_listActions(self, info=None, object=None, src__=False):
if
document
is
not
None
:
if
document
is
not
None
:
document_pt
=
document
.
getTypeInfo
()
document_pt
=
document
.
getTypeInfo
()
if
document_pt
is
not
None
:
if
document_pt
is
not
None
:
workflow_list
=
document_pt
.
getType
ERP5
WorkflowList
()
workflow_list
=
document_pt
.
getTypeWorkflowList
()
if
(
workflow_list
is
not
None
)
and
(
workflow_list
is
not
[]):
if
(
workflow_list
is
not
None
)
and
(
workflow_list
is
not
[]):
for
wf_id
in
workflow_list
:
for
wf_id
in
workflow_list
:
did
[
wf_id
]
=
None
did
[
wf_id
]
=
None
wf
=
self
.
getPortalObject
().
getDefaultModule
(
'Workflow'
)
.
_getOb
(
wf_id
,
None
)
wf
=
self
.
getPortalObject
().
portal_workflow
.
_getOb
(
wf_id
,
None
)
if
wf
is
None
:
if
wf
is
None
:
raise
NotImplementedError
(
"Can not find workflow: %s, please check if the workflow exists."
%
wf_id
)
raise
NotImplementedError
(
"Can not find workflow: %s, please check if the workflow exists."
%
wf_id
)
a
=
wf
.
listObjectActions
(
info
)
a
=
wf
.
listObjectActions
(
info
)
if
a
is
not
None
:
if
a
is
not
None
and
a
!=
[]
:
actions
.
extend
(
a
)
actions
.
extend
(
a
)
a
=
wf
.
getWorklistVariableMatchDict
(
info
)
a
=
wf
.
getWorklistVariableMatchDict
(
info
)
if
a
is
not
None
:
if
a
is
not
None
:
worklist_dict
[
wf_id
]
=
a
worklist_dict
[
wf_id
]
=
a
# DC workflow compatibility
for
wf_id
in
chain
:
for
wf_id
in
chain
:
did
[
wf_id
]
=
None
did
[
wf_id
]
=
None
wf
=
self
.
getWorkflowById
(
wf_id
)
wf
=
self
.
getWorkflowById
(
wf_id
)
...
@@ -508,6 +502,7 @@ def WorkflowTool_listActions(self, info=None, object=None, src__=False):
...
@@ -508,6 +502,7 @@ def WorkflowTool_listActions(self, info=None, object=None, src__=False):
worklist_result_dict
=
{}
worklist_result_dict
=
{}
# Get a list of dict of WorklistVariableMatchDict grouped by compatible
# Get a list of dict of WorklistVariableMatchDict grouped by compatible
# conditions
# conditions
(
worklist_list_grouped_by_condition
,
worklist_metadata
)
=
\
(
worklist_list_grouped_by_condition
,
worklist_metadata
)
=
\
groupWorklistListByCondition
(
groupWorklistListByCondition
(
worklist_dict
=
worklist_dict
,
worklist_dict
=
worklist_dict
,
...
@@ -576,6 +571,7 @@ def WorkflowTool_listActions(self, info=None, object=None, src__=False):
...
@@ -576,6 +571,7 @@ def WorkflowTool_listActions(self, info=None, object=None, src__=False):
key
=
lambda
x
:
'/'
.
join
((
x
[
'workflow_id'
],
x
[
'worklist_id'
])),
key
=
lambda
x
:
'/'
.
join
((
x
[
'workflow_id'
],
x
[
'worklist_id'
])),
)
)
return
action_list
return
action_list
user
=
str
(
_getAuthenticatedUser
(
self
))
user
=
str
(
_getAuthenticatedUser
(
self
))
if
src__
:
if
src__
:
actions
=
_getWorklistActionList
()
actions
=
_getWorklistActionList
()
...
@@ -585,7 +581,6 @@ def WorkflowTool_listActions(self, info=None, object=None, src__=False):
...
@@ -585,7 +581,6 @@ def WorkflowTool_listActions(self, info=None, object=None, src__=False):
cache_factory
=
'erp5_ui_short'
)
cache_factory
=
'erp5_ui_short'
)
actions
.
extend
(
_getWorklistActionList
())
actions
.
extend
(
_getWorklistActionList
())
return
actions
return
actions
WorkflowTool
.
listActions
=
WorkflowTool_listActions
WorkflowTool
.
listActions
=
WorkflowTool_listActions
def
_getWorklistIgnoredSecurityColumnSet
(
self
):
def
_getWorklistIgnoredSecurityColumnSet
(
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