diff options
| author | Xavier Morel <xmo@openerp.com> | 2011-03-23 13:21:26 +0100 |
|---|---|---|
| committer | Xavier Morel <xmo@openerp.com> | 2011-03-23 13:21:26 +0100 |
| commit | 1d587145de0bfad76db50b5e2a96a659ad42e032 (patch) | |
| tree | 680721fbca4d10d0ba4c28bdf2ad8efa3ff42dbf /addons | |
| parent | 801fae18ca92eecd9f6febcc15ec4f3ee0887cc4 (diff) | |
[IMP] fix docstrings on DataSet, insert into internal APIdoc (and fix documentation PYTHONPATH to generate this correctly)
bzr revid: xmo@openerp.com-20110323122126-3qj7vkhjsc6l0x5x
Diffstat (limited to 'addons')
| -rw-r--r-- | addons/base/controllers/main.py | 23 |
1 files changed, 22 insertions, 1 deletions
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) |
