Commit e791886a authored by niv-openerp's avatar niv-openerp

Updated doc

parent 23f6a302
The OpenERP Client Library is a Python library to communicate with an OpenERP Server using its web
services in an user-friendly way. It was created for those that doesn't want to code XML-RPC calls
on the bare metal. It handles XML-RPC as well as NET-RPC protocol and provides a bunch of syntaxic
on the bare metal. It handles XML-RPC as well as JSON-RPC protocol and provides a bunch of syntaxic
sugar to make things a lot easier.
The OpenERP Client Library is officially supported by OpenERP SA.
To consult the source code repository, report bugs or ask questions, see the Launchpad Project:
http://launchpad.net/openerp-client-lib
......@@ -29,10 +31,10 @@ Now copy-paste the following script describing a simple interaction with an Open
In the previous script, the get_connection() method creates a Connection object that represents a
communication channel with authentification to an OpenERP server. By default, get_connection() uses
XML-RPC, but you can specify it to use NetRPC. You can also change the port. Example with a NetRPC
XML-RPC, but you can specify it to use JSON-RPC. You can also change the port. Example with a JSON-RPC
communication on port 6080: ::
connection = openerplib.get_connection(hostname="localhost", protocol="netrpc", port=6080, ...)
connection = openerplib.get_connection(hostname="localhost", protocol="jsonrpc", port=6080, ...)
The get_model() method on the Connection object creates a Model object. That object represents a
remote model on the OpenERP server (for OpenERP addon programmers, those are also called osv).
......@@ -60,22 +62,40 @@ Here are also some considerations about coding using the OpenERP Client Library:
inside an OpenERP addon for such cases. That way it will be executed on the OpenERP server and so it will be
transactional.
- The browse() method can not be used. That method returns a dynamic proxy that lazy loads the rows' data from
the database. That behavior is not implemented in the OpenERP Client Library but it could be in future versions.
the database. That behavior is not implemented in the OpenERP Client Library.
Compatibility
-------------
- 1.0
- XML-RPC: OpenERP version 6.1 and superior
- 1.1
- XML-RPC: OpenERP version 6.1 and superior
- JSON-RPC: OpenERP version 8.0 (upcoming) and superior
Changelog
---------
- 1.1.0:
- 1.1.1:
- Updated documentation
- 1.1.0:
- Added JsonRPC support
- Added JsonRPC support
- 1.0.4:
- 1.0.4:
- Removed netrpc handler
- Added call to model methods with kwargs
- Removed netrpc handler
- Added call to model methods with kwargs
- 1.0.2:
- 1.0.2:
- added dates helper
- added dates helper
......@@ -343,7 +343,7 @@ def get_connector(hostname=None, protocol="xmlrpc", port="auto"):
A shortcut method to easily create a connector to a remote server using XMLRPC.
:param hostname: The hostname to the remote server.
:param protocol: The name of the protocol, must be "xmlrpc" or "xmlrpcs".
:param protocol: The name of the protocol, must be "xmlrpc", "xmlrpcs", "jsonrpc" or "jsonrpcs".
:param port: The number of the port. Defaults to auto.
"""
if port == 'auto':
......@@ -357,7 +357,7 @@ def get_connector(hostname=None, protocol="xmlrpc", port="auto"):
elif protocol == "jsonrpcs":
return JsonRPCSConnector(hostname, port)
else:
raise ValueError("You must choose xmlrpc or xmlrpcs")
raise ValueError("You must choose xmlrpc, xmlrpcs, jsonrpc or jsonrpcs")
def get_connection(hostname=None, protocol="xmlrpc", port='auto', database=None,
login=None, password=None, user_id=None):
......@@ -365,7 +365,7 @@ def get_connection(hostname=None, protocol="xmlrpc", port='auto', database=None,
A shortcut method to easily create a connection to a remote OpenERP server.
:param hostname: The hostname to the remote server.
:param protocol: The name of the protocol, must be "xmlrpc" or "xmlrpcs".
:param protocol: The name of the protocol, must be "xmlrpc", "xmlrpcs", "jsonrpc" or "jsonrpcs".
:param port: The number of the port. Defaults to auto.
:param connector: A valid Connector instance to send messages to the remote server.
:param database: The name of the database to work on.
......
......@@ -35,7 +35,7 @@ def read(fname):
return open(os.path.join(os.path.dirname(__file__), fname)).read()
setup(name='openerp-client-lib',
version='1.1.0',
version='1.1.1',
description='OpenERP Client Library allows to easily interact with OpenERP in Python.',
author='Nicolas Vanhoren',
author_email='niv@openerp.com',
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment