OpenERP client library which allows to easily interact with an OpenERP server.
Project description
=======
OERPLib
=======
`OERPLib` aims to provide an easy way to pilot remotely an `OpenERP` server.
In addition to supporting ``create``, ``read``, ``write``, ``unlink`` and
``search`` operations, this library is also able to generate objects which are
somewhat similar to OSV server-side objects and manipulate them while hiding
XML-RPC queries.
Retrieve reports and execute workflow queries are also possible.
How does it work? See below::
#!/usr/bin/env python
import oerplib
# Prepare the connection to the OpenERP server
oerp = oerplib.OERP('localhost', 'db_name')
# Login
user = oerp.login('user', 'passwd')
print(user.name) # name of the user connected
print(user.company_id.name) # the name of its company
# Simple 'raw' query
user_data = oerp.execute('res.users', 'read', user.id)
print(user_data)
# Or use the 'read' method
# ('create', 'write', 'unlink' and 'search' exist too)
user_data = oerp.read('res.users', user.id)
# Advanced query: browse objects!
for order in oerp.browse('sale.order', [1, 42]):
print(order.name)
for line in order.order_line:
print(line.name)
# Update data through a browsable object
order.name = "NEW ORDER REF"
oerp.write(order)
See the documentation for more details.
Generate the documentation
--------------------------
To generate the documentation, you have to install Sphinx documentation generator::
easy_install -U sphinx
Now, you can use the ``build_sphinx`` option of the ``setup.py``::
python setup.py build_sphinx
The generated documentation will be in the ``./doc/html`` directory.
OERPLib
=======
`OERPLib` aims to provide an easy way to pilot remotely an `OpenERP` server.
In addition to supporting ``create``, ``read``, ``write``, ``unlink`` and
``search`` operations, this library is also able to generate objects which are
somewhat similar to OSV server-side objects and manipulate them while hiding
XML-RPC queries.
Retrieve reports and execute workflow queries are also possible.
How does it work? See below::
#!/usr/bin/env python
import oerplib
# Prepare the connection to the OpenERP server
oerp = oerplib.OERP('localhost', 'db_name')
# Login
user = oerp.login('user', 'passwd')
print(user.name) # name of the user connected
print(user.company_id.name) # the name of its company
# Simple 'raw' query
user_data = oerp.execute('res.users', 'read', user.id)
print(user_data)
# Or use the 'read' method
# ('create', 'write', 'unlink' and 'search' exist too)
user_data = oerp.read('res.users', user.id)
# Advanced query: browse objects!
for order in oerp.browse('sale.order', [1, 42]):
print(order.name)
for line in order.order_line:
print(line.name)
# Update data through a browsable object
order.name = "NEW ORDER REF"
oerp.write(order)
See the documentation for more details.
Generate the documentation
--------------------------
To generate the documentation, you have to install Sphinx documentation generator::
easy_install -U sphinx
Now, you can use the ``build_sphinx`` option of the ``setup.py``::
python setup.py build_sphinx
The generated documentation will be in the ``./doc/html`` directory.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distributions
oerplib_0.2.0-1_all_unstable.deb
(160.4 kB
view hashes)
oerplib_0.2.0-1_all_squeeze.deb
(138.1 kB
view hashes)
oerplib-0.2.0.tar.gz
(20.6 kB
view hashes)
Close
Hashes for oerplib_0.2.0-1_all_unstable.deb
Algorithm | Hash digest | |
---|---|---|
SHA256 | 72ce05ec03f89a53a63c4058dba14628da973776b2ea5cc7d7aadd2f25293b2a |
|
MD5 | 0dad2bee7bd3f81633b67e6cd7556b19 |
|
BLAKE2b-256 | 0c2193590fe0b4441b4a3ec140acd20cf95516902e1d78ac06906c9ae2231ca0 |