Python module to pilot your Odoo servers through JSON-RPC. http://pythonhosted.org/OdooRPC/
  • Python 99.2%
  • Shell 0.8%
Find a file
Sébastien Alix 6b3c558922
Merge pull request #111 from OCA/fix-readthedocs
[FIX] .readthedocs.yaml
2026-05-15 12:52:44 +02:00
.ci [IMP] odoorpc.db: make use of '/web/database/*' controllers for Odoo >= 19.0 2026-05-15 12:21:58 +02:00
.github/workflows [IMP] odoorpc.db: make use of '/web/database/*' controllers for Odoo >= 19.0 2026-05-15 12:21:58 +02:00
docs [FIX] Fix and update Sphinx documentation 2026-05-15 12:21:58 +02:00
odoorpc [IMP] odoorpc.db: make use of '/web/database/*' controllers for Odoo >= 19.0 2026-05-15 12:21:58 +02:00
.flake8 [IMP] integrate pre-commit (on Travis) with some hooks such as black, flake8, pyupgrade and isort 2019-03-22 09:56:37 +01:00
.gitignore Initial commit 2014-10-16 22:21:47 +02:00
.isort.cfg [IMP] integrate pre-commit (on Travis) with some hooks such as black, flake8, pyupgrade and isort 2019-03-22 09:56:37 +01:00
.pre-commit-config.yaml [IMP] Add support for JSON-2 API (Odoo >= 19.0 with API key) 2026-05-15 12:21:58 +02:00
.readthedocs.yaml [FIX] .readthedocs.yaml 2026-05-15 12:48:21 +02:00
AUTHORS Update setup.py + rename/delete some files (README, AUTHORS, CHANGELOG, LICENSE...) 2014-10-16 22:25:42 +02:00
bump_version.sh [FIX] Fix and update Sphinx documentation 2026-05-15 12:21:58 +02:00
CHANGELOG [IMP] Bump version to 0.10.0 2023-05-12 15:09:31 +02:00
LICENSE Update setup.py + rename/delete some files (README, AUTHORS, CHANGELOG, LICENSE...) 2014-10-16 22:25:42 +02:00
MANIFEST.in [FIX] Fix and update Sphinx documentation 2026-05-15 12:21:58 +02:00
pyproject.toml [IMP] integrate pre-commit (on Travis) with some hooks such as black, flake8, pyupgrade and isort 2019-03-22 09:56:37 +01:00
README.rst [FIX] Fix and update Sphinx documentation 2026-05-15 12:21:58 +02:00
requirements.txt [IMP] odoorpc.db: make use of '/web/database/*' controllers for Odoo >= 19.0 2026-05-15 12:21:58 +02:00
run_tests_docker.sh [FIX] Fix and update Sphinx documentation 2026-05-15 12:21:58 +02:00
setup.cfg [ADD] setup.cfg: enable universal bdist_wheel 2018-08-28 18:02:22 +02:00
setup.py [IMP] odoorpc.db: make use of '/web/database/*' controllers for Odoo >= 19.0 2026-05-15 12:21:58 +02:00

=======
OdooRPC
=======

.. image:: https://img.shields.io/pypi/v/OdooRPC.svg
    :target: https://pypi.python.org/pypi/OdooRPC/
    :alt: Latest Version

.. image:: https://travis-ci.org/OCA/odoorpc.svg?branch=master
    :target: https://travis-ci.org/OCA/odoorpc
    :alt: Build Status

.. image:: https://img.shields.io/pypi/pyversions/OdooRPC.svg
    :target: https://pypi.python.org/pypi/OdooRPC/
    :alt: Supported Python versions

.. image:: https://img.shields.io/pypi/l/OdooRPC.svg
    :target: https://pypi.python.org/pypi/OdooRPC/
    :alt: License

**OdooRPC** is a Python package providing an easy way to
pilot your **Odoo** servers through `RPC`.

Features supported:
    - access to all data model methods (even ``browse``) with an API similar
      to the server-side API,
    - use named parameters with model methods,
    - user context automatically sent providing support for
      internationalization,
    - browse records,
    - execute workflows,
    - manage databases,
    - reports downloading,
    - JSON-RPC protocol (SSL supported),

How does it work? See below:

.. code-block:: python

    import odoorpc

    # Prepare the connection to the server
    odoo = odoorpc.ODOO('localhost', port=8069)

    # Check available databases
    print(odoo.db.list())

    # Login
    odoo.login('db_name', 'user', 'passwd')

    # Current user
    user = odoo.env.user
    print(user.name)            # name of the user connected
    print(user.company_id.name) # the name of its company

    # Simple 'raw' query
    user_data = odoo.execute('res.users', 'read', [user.id])
    print(user_data)

    # Use all methods of a model
    if 'sale.order' in odoo.env:
        Order = odoo.env['sale.order']
        order_ids = Order.search([])
        for order in Order.browse(order_ids):
            print(order.name)
            products = [line.product_id.name for line in order.order_line]
            print(products)

    # Update data through a record
    user.name = "Brian Jones"

See the documentation for more details and features.

Supported Odoo server versions
==============================

`OdooRPC` is tested on all major releases of `Odoo` (starting from  8.0).

Supported Python versions
=========================

`OdooRPC` support Python 2.7, 3.7+.

License
=======

This software is made available under the `LGPL v3` license.

Generate the documentation
==========================

To generate the documentation, you have to install `Sphinx` documentation
generator::

    pip install sphinx

Then, you can use the ``build_doc`` option of the ``setup.py``::

    python setup.py build_doc

The generated documentation will be in the ``./docs/build/html`` directory.

Changes in this version
=======================

Consult the ``CHANGELOG`` file.

Bug Tracker
===========

Bugs are tracked on `GitHub Issues
<https://github.com/OCA/odoorpc/issues>`_. In case of trouble, please
check there if your issue has already been reported. If you spotted it first,
help us smash it by providing detailed and welcomed feedback.

Credits
=======

Contributors
------------

* Sébastien Alix <sebastien.alix@osiell.com>

Do not contact contributors directly about support or help with technical issues.

Maintainer
----------

.. image:: https://odoo-community.org/logo.png
   :alt: Odoo Community Association
   :target: https://odoo-community.org

This package is maintained by the OCA.

OCA, or the Odoo Community Association, is a nonprofit organization whose
mission is to support the collaborative development of Odoo features and
promote its widespread use.