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
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
iv
erp5
Commits
b6724253
Commit
b6724253
authored
Oct 10, 2016
by
iv
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ERP5Workflow: PERF: redefine getDestinationIdList not to use the objects directly
parent
0a361ce6
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
0 deletions
+10
-0
product/ERP5Workflow/Document/State.py
product/ERP5Workflow/Document/State.py
+10
-0
No files found.
product/ERP5Workflow/Document/State.py
View file @
b6724253
...
@@ -89,6 +89,16 @@ class State(IdAsReferenceMixin("state_", "prefix"), XMLObject, CustomStorageMatr
...
@@ -89,6 +89,16 @@ class State(IdAsReferenceMixin("state_", "prefix"), XMLObject, CustomStorageMatr
possible_transition_list
.
append
(
tr_path
)
possible_transition_list
.
append
(
tr_path
)
self
.
setCategoryList
(
possible_transition_list
)
self
.
setCategoryList
(
possible_transition_list
)
security
.
declareProtected
(
Permissions
.
AccessContentsInformation
,
'getDestinationIdList'
)
def
getDestinationIdList
(
self
):
"""
this getter is redefined to improve performance:
instead of getting all the transition objects from the destination list
to then use their ids, extract the information from the string
"""
return
[
path
.
split
(
'/'
)[
-
1
]
for
path
in
self
.
getDestinationList
()]
def
getTransitions
(
self
):
def
getTransitions
(
self
):
# return possible transition id list:
# return possible transition id list:
return
self
.
getDestinationIdList
()
return
self
.
getDestinationIdList
()
...
...
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