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
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Hardik Juneja
erp5
Commits
2ce31014
Commit
2ce31014
authored
May 13, 2015
by
wenjie.zheng
Committed by
Sebastien Robin
Jul 16, 2015
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
InteractionWorkflow.py: add universal method for compatibility.
parent
1caabb10
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
18 additions
and
0 deletions
+18
-0
product/ERP5Workflow/Document/InteractionWorkflow.py
product/ERP5Workflow/Document/InteractionWorkflow.py
+18
-0
No files found.
product/ERP5Workflow/Document/InteractionWorkflow.py
View file @
2ce31014
...
...
@@ -387,3 +387,21 @@ class InteractionWorkflow(IdAsReferenceMixin("interactionworkflow_", "prefix"),
sci
=
StateChangeInfo
(
ob
,
self
,
former_status
,
tdef
,
None
,
None
,
kwargs
=
kw
)
script
.
execute
(
sci
)
security
.
declarePrivate
(
'isActionSupported'
)
def
isActionSupported
(
self
,
document
,
action
,
**
kw
):
'''
Returns a true value if the given action name
is possible in the current state.
'''
sdef
=
self
.
_getWorkflowStateOf
(
document
,
id_only
=
0
)
if
sdef
is
None
:
return
0
if
action
in
sdef
.
getDestinationIdList
():
tdef
=
self
.
_getOb
(
action
,
None
)
if
(
tdef
is
not
None
and
tdef
.
trigger_type
==
TRIGGER_USER_ACTION
and
self
.
_checkTransitionGuard
(
tdef
,
document
,
**
kw
)):
return
1
return
0
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