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
0ac23f1c
Commit
0ac23f1c
authored
Jan 22, 2013
by
Julien Muchembled
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
CategoryTool: remove broken/unused getRelatedValueList parameters
parent
9b022399
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
15 deletions
+3
-15
product/CMFCategory/CategoryTool.py
product/CMFCategory/CategoryTool.py
+3
-15
No files found.
product/CMFCategory/CategoryTool.py
View file @
0ac23f1c
...
@@ -1278,7 +1278,6 @@ class CategoryTool( UniqueObject, Folder, Base ):
...
@@ -1278,7 +1278,6 @@ class CategoryTool( UniqueObject, Folder, Base ):
security
.
declareProtected
(
Permissions
.
AccessContentsInformation
,
security
.
declareProtected
(
Permissions
.
AccessContentsInformation
,
'getRelatedValueList'
)
'getRelatedValueList'
)
def
getRelatedValueList
(
self
,
context
,
base_category_list
=
None
,
def
getRelatedValueList
(
self
,
context
,
base_category_list
=
None
,
spec
=
(),
filter
=
None
,
base
=
1
,
checked_permission
=
None
,
**
kw
):
checked_permission
=
None
,
**
kw
):
"""
"""
This methods returns the list of objects related to the context
This methods returns the list of objects related to the context
...
@@ -1289,9 +1288,6 @@ class CategoryTool( UniqueObject, Folder, Base ):
...
@@ -1289,9 +1288,6 @@ class CategoryTool( UniqueObject, Folder, Base ):
if
isinstance
(
portal_type
,
str
):
if
isinstance
(
portal_type
,
str
):
portal_type
=
[
portal_type
]
portal_type
=
[
portal_type
]
if
spec
is
():
# We do not want to care about spec
spec
=
None
# Base Category may not be related, besides sub categories
# Base Category may not be related, besides sub categories
if
context
.
getPortalType
()
==
'Base Category'
:
if
context
.
getPortalType
()
==
'Base Category'
:
...
@@ -1305,16 +1301,10 @@ class CategoryTool( UniqueObject, Folder, Base ):
...
@@ -1305,16 +1301,10 @@ class CategoryTool( UniqueObject, Folder, Base ):
for
base_category
in
base_category_list
:
for
base_category
in
base_category_list
:
category_list
.
append
(
"%s/%s"
%
(
base_category
,
context
.
getRelativeUrl
()))
category_list
.
append
(
"%s/%s"
%
(
base_category
,
context
.
getRelativeUrl
()))
sql_kw
=
{}
for
sql_key
in
(
'limit'
,
'order_by_expression'
):
# XXX-JPS it would be better to use Catalog API
if
sql_key
in
kw
:
sql_kw
[
sql_key
]
=
kw
[
sql_key
]
brain_result
=
self
.
Base_zSearchRelatedObjectsByCategoryList
(
brain_result
=
self
.
Base_zSearchRelatedObjectsByCategoryList
(
category_list
=
category_list
,
category_list
=
category_list
,
portal_type
=
portal_type
,
portal_type
=
portal_type
,
strict_membership
=
strict_membership
,
strict_membership
=
strict_membership
)
**
sql_kw
)
result
=
[]
result
=
[]
if
checked_permission
is
None
:
if
checked_permission
is
None
:
...
@@ -1345,8 +1335,7 @@ class CategoryTool( UniqueObject, Folder, Base ):
...
@@ -1345,8 +1335,7 @@ class CategoryTool( UniqueObject, Folder, Base ):
security
.
declareProtected
(
Permissions
.
AccessContentsInformation
,
security
.
declareProtected
(
Permissions
.
AccessContentsInformation
,
'getRelatedPropertyList'
)
'getRelatedPropertyList'
)
def
getRelatedPropertyList
(
self
,
context
,
base_category_list
=
None
,
def
getRelatedPropertyList
(
self
,
context
,
base_category_list
=
None
,
property_name
=
None
,
spec
=
(),
property_name
=
None
,
filter
=
None
,
base
=
1
,
checked_permission
=
None
,
**
kw
):
checked_permission
=
None
,
**
kw
):
"""
"""
This methods returns the list of property_name on objects
This methods returns the list of property_name on objects
...
@@ -1355,8 +1344,7 @@ class CategoryTool( UniqueObject, Folder, Base ):
...
@@ -1355,8 +1344,7 @@ class CategoryTool( UniqueObject, Folder, Base ):
result
=
[]
result
=
[]
for
o
in
self
.
getRelatedValueList
(
for
o
in
self
.
getRelatedValueList
(
context
=
context
,
context
=
context
,
base_category_list
=
base_category_list
,
spec
=
spec
,
base_category_list
=
base_category_list
,
filter
=
filter
,
base
=
base
,
checked_permission
=
checked_permission
,
**
kw
):
checked_permission
=
checked_permission
,
**
kw
):
result
.
append
(
o
.
getProperty
(
property_name
,
None
))
result
.
append
(
o
.
getProperty
(
property_name
,
None
))
return
result
return
result
...
...
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