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
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
Frederic Thoma
erp5
Commits
1f13a62a
Commit
1f13a62a
authored
Mar 23, 2015
by
wenjie.zheng
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
patches/WorkflowTool.py: Load worklist in Action Box.
parent
63f1674c
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
8 deletions
+14
-8
product/ERP5Type/patches/WorkflowTool.py
product/ERP5Type/patches/WorkflowTool.py
+14
-8
No files found.
product/ERP5Type/patches/WorkflowTool.py
View file @
1f13a62a
...
@@ -2,7 +2,7 @@
...
@@ -2,7 +2,7 @@
##############################################################################
##############################################################################
#
#
# Copyright (c) 2001 Zope Corporation and Contributors. All Rights Reserved.
# Copyright (c) 2001 Zope Corporation and Contributors. All Rights Reserved.
# Copyright (c) 2002,2005 Nexedi SARL and Contributors. All Rights Reserved.
# Copyright (c) 2002,2005
,2015
Nexedi SARL and Contributors. All Rights Reserved.
#
#
# This software is subject to the provisions of the Zope Public License,
# This software is subject to the provisions of the Zope Public License,
# Version 2.0 (ZPL). A copy of the ZPL should accompany this distribution.
# Version 2.0 (ZPL). A copy of the ZPL should accompany this distribution.
...
@@ -461,15 +461,11 @@ def WorkflowTool_listActions(self, info=None, object=None, src__=False):
...
@@ -461,15 +461,11 @@ def WorkflowTool_listActions(self, info=None, object=None, src__=False):
worklist_dict
=
{}
worklist_dict
=
{}
document
=
info
.
object
document
=
info
.
object
#LOG('zwj: Object is %s'%document.getId(), WARNING, ' in Workflow tool.')
#LOG('zwj: Object url is %s'%info.object_url, WARNING, ' in Workflow tool.')
#LOG('zwj: Context is %s'%self.getId(), WARNING, ' in Workflow tool.')
#LOG('zwj: folder url is %s'%info.portal_url, WARNING, ' in Workflow tool.')
### zwj: following part is for ERP5Workflow actions
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
:
#LOG('zwj: document is %s, pt is %s'%(document.getId(), document_pt.getId()), WARNING, ' in WorkflowTool.py.')
workflow_list
=
document_pt
.
getTypeERP5WorkflowList
()
workflow_list
=
document_pt
.
getTypeERP5WorkflowList
()
if
(
workflow_list
is
not
None
)
and
(
workflow_list
is
not
[]):
if
(
workflow_list
is
not
None
)
and
(
workflow_list
is
not
[]):
LOG
(
'zwj: ERP5Workflow_list is %s'
%
str
(
workflow_list
),
WARNING
,
' in Workflow tool.'
)
LOG
(
'zwj: ERP5Workflow_list is %s'
%
str
(
workflow_list
),
WARNING
,
' in Workflow tool.'
)
...
@@ -480,12 +476,21 @@ def WorkflowTool_listActions(self, info=None, object=None, src__=False):
...
@@ -480,12 +476,21 @@ def WorkflowTool_listActions(self, info=None, object=None, src__=False):
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
:
#LOG('zwj: action is %s'%a.get('id', None), WARNING, ' in Workflow tool.')
actions
.
extend
(
a
)
actions
.
extend
(
a
)
a
=
wf
.
getWorklistVariableMatchDict
(
info
)
"""
a = wf.listGlobalActions(info)
if a is not None:
actions.extend(a)
"""
a
=
wf
.
getWorklistVariableMatchDict
(
info
)
### zwj: replace listGlobalActions(info)
if
a
is
not
None
:
actions
.
extend
(
a
)
### zwj: ???
if
a
is
not
None
:
if
a
is
not
None
:
worklist_dict
[
wf_id
]
=
a
worklist_dict
[
wf_id
]
=
a
### ==========================================================================
### zwj: following part is for DCWorkflow actions
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
)
...
@@ -506,6 +511,7 @@ def WorkflowTool_listActions(self, info=None, object=None, src__=False):
...
@@ -506,6 +511,7 @@ def WorkflowTool_listActions(self, info=None, object=None, src__=False):
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
### ==========================================================================
if
worklist_dict
:
if
worklist_dict
:
portal
=
self
.
getPortalObject
()
portal
=
self
.
getPortalObject
()
...
...
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