[FIX] documentation handling issues

bzr revid: xmo@openerp.com-20110328091809-kju0n2rw232z1pxf
This commit is contained in:
Xavier Morel 2011-03-28 11:18:09 +02:00
parent 5820b8f32c
commit ec7510b839
3 changed files with 23 additions and 16 deletions

View File

@ -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"

View File

@ -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
-------

View File

@ -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}