oerplib

The oerplib module defines the OERP class.

The OERP class manage the client-side operations which are related to an OpenERP server. You can use this one to write Python programs that performs a variety of automated jobs that communicate with an OpenERP server.

You can load a pre-configured OERP session with the load() function.

Here’s a sample session using this module:

>>> import oerplib
>>> oerp = oerplib.OERP('localhost')                    # connect to localhost, default port
>>> user = oerp.login('admin', 'admin', 'my_database')  # login returns an user object
>>> user.name
'Administrator'
>>> oerp.save('foo')                                    # save session informations in ~/.oerplibrc
>>> oerp = oerplib.load('foo')                          # get a pre-configured session from ~/.oerplibrc

Previous topic

Browse object fields

Next topic

oerplib.OERP

This Page