[IMP] fix docstrings on DataSet, insert into internal APIdoc (and fix documentation PYTHONPATH to generate this correctly)
bzr revid: xmo@openerp.com-20110323122126-3qj7vkhjsc6l0x5x
This commit is contained in:
parent
801fae18ca
commit
1d587145de
|
@ -177,7 +177,26 @@ class DataSet(openerpweb.Controller):
|
|||
def do_find(self, request, model, fields=False, offset=0, limit=False,
|
||||
domain=None, context=None, sort=None):
|
||||
""" Performs a search() followed by a read() (if needed) using the
|
||||
provided search criteria, only
|
||||
provided search criteria
|
||||
|
||||
:param request: a JSON-RPC request object
|
||||
:type request: openerpweb.JsonRequest
|
||||
:param model: the name of the model to search on
|
||||
:type model: str
|
||||
:param fields: a list of the fields to return in the result records
|
||||
:type fields: [str]
|
||||
:param offset: from which index should the results start being returned
|
||||
:type offset: int
|
||||
:param limit: the maximum number of records to return
|
||||
:type limit: int
|
||||
:param domain: the search domain for the query
|
||||
:type domain: list
|
||||
:param context: the context in which the search should be executed
|
||||
:type context: dict
|
||||
:param sort: sorting directives
|
||||
:type sort: list
|
||||
:returns: a list of result records
|
||||
:rtype: []
|
||||
"""
|
||||
Model = request.session.model(model)
|
||||
ids = Model.search(domain or [], offset or 0, limit or False,
|
||||
|
@ -204,6 +223,8 @@ class DataSet(openerpweb.Controller):
|
|||
:type model: str
|
||||
:param ids: a list of identifiers
|
||||
:type ids: list
|
||||
:returns: a list of records, in the same order as the list of ids
|
||||
:rtype: list
|
||||
"""
|
||||
Model = request.session.model(model)
|
||||
records = Model.read(ids)
|
||||
|
|
|
@ -16,7 +16,8 @@ import sys, os
|
|||
# If extensions (or modules to document with autodoc) are in another directory,
|
||||
# add these directories to sys.path here. If the directory is relative to the
|
||||
# documentation root, use os.path.abspath to make it absolute, like shown here.
|
||||
#sys.path.insert(0, os.path.abspath('.'))
|
||||
sys.path.insert(0, os.path.abspath('../../addons'))
|
||||
sys.path.insert(0, os.path.abspath('../..'))
|
||||
|
||||
# -- General configuration -----------------------------------------------------
|
||||
|
||||
|
|
|
@ -8,6 +8,15 @@ Contributing to OpenERP Web
|
|||
* Style guide and coding conventions (PEP8? More)
|
||||
* Test frameworks in JS?
|
||||
|
||||
Internal API Doc
|
||||
----------------
|
||||
|
||||
Python
|
||||
++++++
|
||||
|
||||
.. autoclass:: base.controllers.main.DataSet
|
||||
:members:
|
||||
|
||||
Testing
|
||||
-------
|
||||
|
||||
|
|
Loading…
Reference in New Issue