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
Analytics
Analytics
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Commits
Open sidebar
Lu Xu
erp5
Commits
95bfbea6
Commit
95bfbea6
authored
Aug 29, 2017
by
Kazuhiko Shiozaki
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ERP5Catalog: define API explicitly in CatalogTool.getDocumentValueList().
parent
701c496e
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
25 additions
and
5 deletions
+25
-5
product/ERP5Catalog/CatalogTool.py
product/ERP5Catalog/CatalogTool.py
+25
-5
No files found.
product/ERP5Catalog/CatalogTool.py
View file @
95bfbea6
...
...
@@ -1242,10 +1242,10 @@ class CatalogTool (UniqueObject, ZCatalog, CMFCoreCatalogTool, ActiveObject):
db
.
query
(
r
)
return
src
# XXX which permission ?
# XXX API parameters should be explicitly defined in interface
# instead of **kw
def
getDocumentValueList
(
self
,
**
kw
):
security
.
declarePublic
(
'getDocumentValueList'
)
def
getDocumentValueList
(
self
,
sql_catalog_id
=
None
,
search_context
=
None
,
language
=
None
,
all_languages
=
None
,
all_versions
=
None
,
now
=
None
,
**
kw
):
"""
Return the list of documents which belong to the
current section. The API is designed to
...
...
@@ -1256,7 +1256,27 @@ class CatalogTool (UniqueObject, ZCatalog, CMFCoreCatalogTool, ActiveObject):
This method must be implemented through a
catalog method script :
SQLCatalog_getDocumentValueList
Here is the list of arguments :
* search_context
* language
* all_languages
* all_versions
* now
If you specify search_context, its predicate will be
respected,
i.e. web_section.WebSection_getDocumentValueList is
equivalent to
portal_catalog.getDocumentValueList(search_context=web_section)
"""
return
self
.
getSQLCatalog
().
SQLCatalog_getDocumentValueList
(
**
kw
)
catalog
=
self
.
getSQLCatalog
(
sql_catalog_id
)
return
catalog
.
SQLCatalog_getDocumentValueList
(
search_context
=
search_context
,
language
=
language
,
all_languages
=
all_languages
,
all_versions
=
all_versions
,
now
=
now
,
**
kw
)
InitializeClass
(
CatalogTool
)
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