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
Alain Takoudjou
erp5
Commits
d5df9c98
Commit
d5df9c98
authored
May 06, 2015
by
wenjie.zheng
Committed by
Sebastien Robin
Jul 16, 2015
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
patches/WorkflowTool.py: modification on universal methods.
parent
454bcceb
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
8 deletions
+5
-8
product/ERP5Type/patches/WorkflowTool.py
product/ERP5Type/patches/WorkflowTool.py
+5
-8
No files found.
product/ERP5Type/patches/WorkflowTool.py
View file @
d5df9c98
...
...
@@ -140,9 +140,13 @@ def DCWorkflowDefinition_getWorklistIdList(self):
return
self
.
worklists
.
objectIds
()
return
[]
def
StateDefinition_getDestinationIdList
(
self
):
return
self
.
transitions
DCWorkflowDefinition
.
getReference
=
method_getReference
TransitionDefinition
.
getReference
=
method_getReference
StateDefinition
.
getReference
=
method_getReference
StateDefinition
.
getDestinationIdList
=
StateDefinition_getDestinationIdList
VariableDefinition
.
getReference
=
method_getReference
WorklistDefinition
.
getReference
=
method_getReference
...
...
@@ -922,12 +926,7 @@ WorkflowTool.getFutureStateSetFor = lambda self, wf_id, *args, **kw: \
def
WorkflowTool_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
)):
state
=
workflow
.
_getWorkflowStateOf
(
ob
)
if
state
and
transition_id
in
state
.
transitions
:
return
1
for
workflow_id
in
ob
.
getTypeInfo
().
getTypeERP5WorkflowList
():
workflow
=
self
.
getPortalObject
().
getDefaultModule
(
'Workflow'
).
_getOb
(
workflow_id
)
for
workflow
in
(
wf_id
and
(
self
[
wf_id
],)
or
self
.
getWorkflowValueListFor
(
ob
.
getPortalType
())):
state
=
workflow
.
_getWorkflowStateOf
(
ob
)
if
state
and
transition_id
in
state
.
getDestinationIdList
():
return
1
...
...
@@ -1045,7 +1044,6 @@ def _doActionFor(self, ob, action, wf_id=None, *args, **kw):
for
wf
in
workflow_list
:
if
wf
.
isActionSupported
(
ob
,
action
,
**
kw
):
found
=
1
case
=
2
break
if
not
found
:
msg
=
_
(
u"No workflow provides the '${action_id}' action."
,
mapping
=
{
'action_id'
:
action
})
...
...
@@ -1114,7 +1112,6 @@ def _getInfoFor(self, ob, name, default=_marker, wf_id=None, *args, **kw):
for
workflow
in
workflow_list
:
if
workflow
.
isInfoSuported
(
ob
,
name
):
found
=
1
case
=
2
break
if
not
found
:
if
default
is
_marker
:
...
...
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