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
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Noah Brackenbury
erp5
Commits
0082fbdd
Commit
0082fbdd
authored
Aug 29, 2017
by
Kazuhiko Shiozaki
Committed by
Vincent Pelletier
Sep 01, 2017
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ERP5Catalog: define API explicitly in CatalogTool.getDocumentValueList().
parent
d000a6f3
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 @
0082fbdd
...
...
@@ -1268,10 +1268,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
...
...
@@ -1282,7 +1282,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