Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
erp5-Boxiang
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
Hamza
erp5-Boxiang
Commits
4b275002
Commit
4b275002
authored
Mar 15, 2016
by
Jérome Perrin
Committed by
Tristan Cavelier
Apr 12, 2016
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ERP5Type.Base: prefer title over reference in getCompact*Title
parent
75f9b67b
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
6 deletions
+6
-6
product/ERP5Type/Base.py
product/ERP5Type/Base.py
+6
-6
No files found.
product/ERP5Type/Base.py
View file @
4b275002
...
...
@@ -2349,8 +2349,8 @@ class Base( CopyContainer,
Returns the first non-null value from the following:
- "getCompactTitle" type based method
- short title
- reference
- title
- reference
- id
"""
method
=
self
.
_getTypeBasedMethod
(
'getCompactTitle'
)
...
...
@@ -2360,8 +2360,8 @@ class Base( CopyContainer,
if
self
.
hasShortTitle
():
r
=
self
.
getShortTitle
()
if
r
:
return
r
return
(
self
.
getProperty
(
'reference'
)
or
getattr
(
self
,
'_baseGetTitle'
,
str
)(
)
or
return
(
getattr
(
self
,
'_baseGetTitle'
,
str
)(
)
or
self
.
getProperty
(
'reference'
)
or
self
.
getId
())
security
.
declareProtected
(
Permissions
.
AccessContentsInformation
,
...
...
@@ -2373,9 +2373,9 @@ class Base( CopyContainer,
- "getCompactTitle" type based method
- translated short title
- short title
- reference
- translated title
- title
- reference
- id
"""
method
=
self
.
_getTypeBasedMethod
(
'getCompactTranslatedTitle'
)
...
...
@@ -2391,10 +2391,10 @@ class Base( CopyContainer,
if
r
:
return
r
r
=
self
.
getShortTitle
()
if
r
:
return
r
return
(
self
.
getProperty
(
'reference'
)
or
# No need to test existence since all Base instances have this method
return
(
# No need to test existence since all Base instances have this method
# Also useful whenever title is calculated
self
.
_baseGetTranslatedTitle
()
or
self
.
getProperty
(
'reference'
)
or
self
.
getId
())
# This method allows to sort objects in list is a more reasonable way
...
...
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