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
4129833b
Commit
4129833b
authored
Oct 12, 2015
by
wenjie.zheng
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
WorkflowTool.py: getWorkflowsFor directly using ob to get workflow assignements.
parent
c9dadf2a
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
4 deletions
+4
-4
product/ERP5/Tool/WorkflowTool.py
product/ERP5/Tool/WorkflowTool.py
+4
-4
No files found.
product/ERP5/Tool/WorkflowTool.py
View file @
4129833b
...
...
@@ -199,8 +199,8 @@ class WorkflowTool(BaseTool, OriginalWorkflowTool):
if
isinstance
(
ob
,
basestring
):
portal_type
=
self
.
getPortalObject
().
portal_types
.
_getOb
(
ob
,
None
)
elif
hasattr
(
aq_base
(
ob
),
'get
PortalType
'
):
portal_type
=
self
.
getPortalObject
().
portal_types
.
_getOb
(
ob
.
getPortalType
(),
None
)
elif
hasattr
(
aq_base
(
ob
),
'get
TypeInfo
'
):
portal_type
=
ob
.
getTypeInfo
(
)
else
:
portal_type
=
None
...
...
@@ -567,7 +567,7 @@ class WorkflowTool(BaseTool, OriginalWorkflowTool):
def
isTransitionPossible
(
self
,
ob
,
transition_id
,
wf_id
=
None
):
"""Test if the given transition exist from the current state.
"""
for
workflow
in
(
wf_id
and
(
self
[
wf_id
],)
or
self
.
getWorkflowsFor
(
ob
.
getPortalType
()
)):
for
workflow
in
(
wf_id
and
(
self
[
wf_id
],)
or
self
.
getWorkflowsFor
(
ob
)):
state
=
workflow
.
_getWorkflowStateOf
(
ob
)
if
state
and
transition_id
in
state
.
getDestinationReferenceList
():
return
1
...
...
@@ -905,7 +905,7 @@ class WorkflowTool(BaseTool, OriginalWorkflowTool):
trash_tool
=
getattr
(
self
.
getPortalObject
(),
'portal_trash'
,
None
)
if
trash_tool
is
not
None
:
# move old workflow to trash tool;
LOG
(
'WorkflowTool'
,
WARNING
,
"Move old workflow '%s' into a trash bin."
%
dc_wf
.
id
)
LOG
(
" | Move old workflow '%s' into a trash bin"
%
dc_wf
.
id
,
0
,
" in WorkflowTool.py 908."
)
self
.
_delOb
(
dc_wf
.
id
)
trashbin
=
UnrestrictedMethod
(
trash_tool
.
newTrashBin
)(
dc_wf
.
id
)
trashbin
.
_setOb
(
dc_wf
.
id
,
dc_wf
)
...
...
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