Not Logged In

openerp-client-lib 1.0.4

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
sugar to make things a lot easier.

To consult the source code repository, report bugs or ask questions, see the Launchpad Project:

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
communication on 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).
Model objects are dynamic proxies, which means you can remotely call methods in a natural way.
In the previous script we demonstrate the usage of the search() and read() methods. That scenario
is equivalent to the following interaction when you are coding an OpenERP addon and this code is
executed on the server:

Here are also some considerations about coding using the OpenERP Client Library:

Since you are using remote procedure calls, every call is executed inside its own transaction. So it can
be dangerous, for example, to code multiple interdependant row creations. You should consider coding a method
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.