diff --git a/addons/base/controllers/main.py b/addons/base/controllers/main.py index 5fa2e36b154..777cd090a76 100644 --- a/addons/base/controllers/main.py +++ b/addons/base/controllers/main.py @@ -7,6 +7,9 @@ import simplejson import openerpweb +__all__ = ['Session', 'Menu', 'DataSet', 'DataRecord', + 'View', 'FormView', 'ListView', 'SearchView', + 'Action'] class Xml2Json: # xml2json-direct @@ -196,20 +199,14 @@ class DataSet(openerpweb.Controller): :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 str model: the name of the model to search on :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 + :param int offset: from which index should the results start being returned + :param int limit: the maximum number of records to return + :param list domain: the search domain for the query + :param dict context: the context in which the search should be executed + :param list sort: sorting directives :returns: a list of result records :rtype: list """ @@ -318,7 +315,6 @@ class View(openerpweb.Controller): self.normalize_attrs(elem, context) return root - class FormView(View): _cp_path = "/base/formview" diff --git a/doc/source/development.rst b/doc/source/development.rst index afc6040227d..e6f31b21e83 100644 --- a/doc/source/development.rst +++ b/doc/source/development.rst @@ -14,8 +14,18 @@ Internal API Doc Python ++++++ -.. autoclass:: base.controllers.main.DataSet +These classes should be moved to other sections of the doc as needed, +probably. + +.. automodule:: openerpweb.openerpweb + :members: JsonRequest + + See also: :class:`~openerpweb.openerpweb.OpenERPSession`, + :class:`~openerpweb.openerpweb.OpenERPModel` + +.. automodule:: base.controllers.main :members: + :undoc-members: Testing ------- diff --git a/openerpweb/openerpweb.py b/openerpweb/openerpweb.py index 724a523aa13..df75cd1d86b 100644 --- a/openerpweb/openerpweb.py +++ b/openerpweb/openerpweb.py @@ -230,8 +230,9 @@ class OpenERPSession(object): class JsonRequest(object): """ JSON-RPC2 over HTTP POST using non standard POST encoding. Difference with the standard: - - the json string is passed as a form parameter named "request" - - method is currently ignored + + * the json string is passed as a form parameter named "request" + * method is currently ignored Sucessful request: --> {"jsonrpc": "2.0", "method": "call", "params": {"session_id": "SID", "context": {}, "arg1": "val1" }, "id": null}