[FIX] documentation handling issues
bzr revid: xmo@openerp.com-20110328091809-kju0n2rw232z1pxf
This commit is contained in:
parent
5820b8f32c
commit
ec7510b839
|
@ -7,6 +7,9 @@ import simplejson
|
||||||
|
|
||||||
import openerpweb
|
import openerpweb
|
||||||
|
|
||||||
|
__all__ = ['Session', 'Menu', 'DataSet', 'DataRecord',
|
||||||
|
'View', 'FormView', 'ListView', 'SearchView',
|
||||||
|
'Action']
|
||||||
|
|
||||||
class Xml2Json:
|
class Xml2Json:
|
||||||
# xml2json-direct
|
# xml2json-direct
|
||||||
|
@ -196,20 +199,14 @@ class DataSet(openerpweb.Controller):
|
||||||
|
|
||||||
:param request: a JSON-RPC request object
|
:param request: a JSON-RPC request object
|
||||||
:type request: openerpweb.JsonRequest
|
:type request: openerpweb.JsonRequest
|
||||||
:param model: the name of the model to search on
|
:param str 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
|
:param fields: a list of the fields to return in the result records
|
||||||
:type fields: [str]
|
:type fields: [str]
|
||||||
:param offset: from which index should the results start being returned
|
:param int offset: from which index should the results start being returned
|
||||||
:type offset: int
|
:param int limit: the maximum number of records to return
|
||||||
:param limit: the maximum number of records to return
|
:param list domain: the search domain for the query
|
||||||
:type limit: int
|
:param dict context: the context in which the search should be executed
|
||||||
:param domain: the search domain for the query
|
:param list sort: sorting directives
|
||||||
: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
|
:returns: a list of result records
|
||||||
:rtype: list
|
:rtype: list
|
||||||
"""
|
"""
|
||||||
|
@ -318,7 +315,6 @@ class View(openerpweb.Controller):
|
||||||
self.normalize_attrs(elem, context)
|
self.normalize_attrs(elem, context)
|
||||||
return root
|
return root
|
||||||
|
|
||||||
|
|
||||||
class FormView(View):
|
class FormView(View):
|
||||||
_cp_path = "/base/formview"
|
_cp_path = "/base/formview"
|
||||||
|
|
||||||
|
|
|
@ -14,8 +14,18 @@ Internal API Doc
|
||||||
Python
|
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:
|
:members:
|
||||||
|
:undoc-members:
|
||||||
|
|
||||||
Testing
|
Testing
|
||||||
-------
|
-------
|
||||||
|
|
|
@ -230,8 +230,9 @@ class OpenERPSession(object):
|
||||||
class JsonRequest(object):
|
class JsonRequest(object):
|
||||||
""" JSON-RPC2 over HTTP POST using non standard POST encoding.
|
""" JSON-RPC2 over HTTP POST using non standard POST encoding.
|
||||||
Difference with the standard:
|
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:
|
Sucessful request:
|
||||||
--> {"jsonrpc": "2.0", "method": "call", "params": {"session_id": "SID", "context": {}, "arg1": "val1" }, "id": null}
|
--> {"jsonrpc": "2.0", "method": "call", "params": {"session_id": "SID", "context": {}, "arg1": "val1" }, "id": null}
|
||||||
|
|
Loading…
Reference in New Issue