Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
E
erp5_rtl_support
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
Romain Courteaud
erp5_rtl_support
Commits
e41c43b8
Commit
e41c43b8
authored
Mar 15, 2016
by
Jérome Perrin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ERP5Type.Base: prefer title over reference in getCompact*Title
parent
cb33c6e9
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 @
e41c43b8
...
@@ -2349,8 +2349,8 @@ class Base( CopyContainer,
...
@@ -2349,8 +2349,8 @@ class Base( CopyContainer,
Returns the first non-null value from the following:
Returns the first non-null value from the following:
- "getCompactTitle" type based method
- "getCompactTitle" type based method
- short title
- short title
- reference
- title
- title
- reference
- id
- id
"""
"""
method
=
self
.
_getTypeBasedMethod
(
'getCompactTitle'
)
method
=
self
.
_getTypeBasedMethod
(
'getCompactTitle'
)
...
@@ -2360,8 +2360,8 @@ class Base( CopyContainer,
...
@@ -2360,8 +2360,8 @@ class Base( CopyContainer,
if
self
.
hasShortTitle
():
if
self
.
hasShortTitle
():
r
=
self
.
getShortTitle
()
r
=
self
.
getShortTitle
()
if
r
:
return
r
if
r
:
return
r
return
(
self
.
getProperty
(
'reference'
)
or
return
(
getattr
(
self
,
'_baseGetTitle'
,
str
)(
)
or
getattr
(
self
,
'_baseGetTitle'
,
str
)(
)
or
self
.
getProperty
(
'reference'
)
or
self
.
getId
())
self
.
getId
())
security
.
declareProtected
(
Permissions
.
AccessContentsInformation
,
security
.
declareProtected
(
Permissions
.
AccessContentsInformation
,
...
@@ -2373,9 +2373,9 @@ class Base( CopyContainer,
...
@@ -2373,9 +2373,9 @@ class Base( CopyContainer,
- "getCompactTitle" type based method
- "getCompactTitle" type based method
- translated short title
- translated short title
- short title
- short title
- reference
- translated title
- translated title
- title
- title
- reference
- id
- id
"""
"""
method
=
self
.
_getTypeBasedMethod
(
'getCompactTranslatedTitle'
)
method
=
self
.
_getTypeBasedMethod
(
'getCompactTranslatedTitle'
)
...
@@ -2391,10 +2391,10 @@ class Base( CopyContainer,
...
@@ -2391,10 +2391,10 @@ class Base( CopyContainer,
if
r
:
return
r
if
r
:
return
r
r
=
self
.
getShortTitle
()
r
=
self
.
getShortTitle
()
if
r
:
return
r
if
r
:
return
r
return
(
self
.
getProperty
(
'reference'
)
or
return
(
# No need to test existence since all Base instances have this method
# No need to test existence since all Base instances have this method
# Also useful whenever title is calculated
# Also useful whenever title is calculated
self
.
_baseGetTranslatedTitle
()
or
self
.
_baseGetTranslatedTitle
()
or
self
.
getProperty
(
'reference'
)
or
self
.
getId
())
self
.
getId
())
# This method allows to sort objects in list is a more reasonable way
# 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