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
1
Issues
1
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
Roque
erp5
Commits
c17da2c1
Commit
c17da2c1
authored
Jul 30, 2015
by
wenjie.zheng
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
WorkflowTool.py: small improvement in getWorkflowValueListFor, remove no necessary attribute.
parent
8fef7223
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
16 deletions
+10
-16
product/ERP5/Tool/WorkflowTool.py
product/ERP5/Tool/WorkflowTool.py
+10
-16
No files found.
product/ERP5/Tool/WorkflowTool.py
View file @
c17da2c1
...
@@ -196,16 +196,11 @@ class WorkflowTool(BaseTool, OriginalWorkflowTool):
...
@@ -196,16 +196,11 @@ class WorkflowTool(BaseTool, OriginalWorkflowTool):
workflow_list
=
[]
workflow_list
=
[]
if
isinstance
(
ob
,
basestring
):
if
isinstance
(
ob
,
basestring
):
portal_type
_id
=
ob
portal_type
=
self
.
getPortalObject
().
portal_types
.
_getOb
(
ob
,
None
)
elif
hasattr
(
aq_base
(
ob
),
'getPortalType'
):
elif
hasattr
(
aq_base
(
ob
),
'getPortalType'
):
portal_type
_id
=
ob
.
getPortalType
(
)
portal_type
=
self
.
getPortalObject
().
portal_types
.
_getOb
(
ob
.
getPortalType
(),
None
)
else
:
else
:
portal_type_id
=
None
portal_type
=
None
if
portal_type_id
is
None
:
return
workflow_list
portal_type
=
self
.
getPortalObject
().
portal_types
.
_getOb
(
portal_type_id
,
None
)
# Workflow assignment:
# Workflow assignment:
if
portal_type
is
not
None
:
if
portal_type
is
not
None
:
...
@@ -704,8 +699,7 @@ class WorkflowTool(BaseTool, OriginalWorkflowTool):
...
@@ -704,8 +699,7 @@ class WorkflowTool(BaseTool, OriginalWorkflowTool):
for
wf_id
in
workflow_list
:
for
wf_id
in
workflow_list
:
did
[
wf_id
]
=
None
did
[
wf_id
]
=
None
wf
=
self
.
getPortalObject
().
portal_workflow
.
_getOb
(
wf_id
,
None
)
wf
=
self
.
getPortalObject
().
portal_workflow
.
_getOb
(
wf_id
,
None
)
if
wf
is
None
:
if
wf
is
not
None
:
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
and
a
!=
[]:
if
a
is
not
None
and
a
!=
[]:
actions
.
extend
(
a
)
actions
.
extend
(
a
)
...
...
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