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
Aurélien Vermylen
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):
...
@@ -1242,10 +1242,10 @@ class CatalogTool (UniqueObject, ZCatalog, CMFCoreCatalogTool, ActiveObject):
db
.
query
(
r
)
db
.
query
(
r
)
return
src
return
src
# XXX which permission ?
security
.
declarePublic
(
'getDocumentValueList'
)
# XXX API parameters should be explicitly defined in interface
def
getDocumentValueList
(
self
,
sql_catalog_id
=
None
,
# instead of **kw
search_context
=
None
,
language
=
None
,
all_languages
=
None
,
def
getDocumentValueList
(
self
,
**
kw
):
all_versions
=
None
,
now
=
None
,
**
kw
):
"""
"""
Return the list of documents which belong to the
Return the list of documents which belong to the
current section. The API is designed to
current section. The API is designed to
...
@@ -1256,7 +1256,27 @@ class CatalogTool (UniqueObject, ZCatalog, CMFCoreCatalogTool, ActiveObject):
...
@@ -1256,7 +1256,27 @@ class CatalogTool (UniqueObject, ZCatalog, CMFCoreCatalogTool, ActiveObject):
This method must be implemented through a
This method must be implemented through a
catalog method script :
catalog method script :
SQLCatalog_getDocumentValueList
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
)
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