oerplib¶
The oerplib module defines the OERP
class.
The OERP
class is the entry point to manage OpenERP/Odoo servers.
You can use this one to write Python programs that
performs a variety of automated jobs that communicate with a
OpenERP/Odoo 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