diff --git a/addons/base/controllers/main.py b/addons/base/controllers/main.py index 723b0ae39dc..58dc837379e 100644 --- a/addons/base/controllers/main.py +++ b/addons/base/controllers/main.py @@ -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) diff --git a/doc/source/conf.py b/doc/source/conf.py index d3f486f19c5..13a490c5072 100644 --- a/doc/source/conf.py +++ b/doc/source/conf.py @@ -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 ----------------------------------------------------- diff --git a/doc/source/development.rst b/doc/source/development.rst index a2be0ec2eef..afc6040227d 100644 --- a/doc/source/development.rst +++ b/doc/source/development.rst @@ -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 -------