Skip to main content

Odooly, a versatile tool for Odoo

Download and install the latest release:

pip install -U odooly

Documentation and tutorial: https://odooly.readthedocs.io/

Overview

Odooly connects to an Odoo instance through HTTP. It makes it easy to browse the application model, and to perform actions. It carries three modes of use:

  1. with command line arguments

  2. as an interactive shell

  3. as a client library

Key features:

  • provides an API similar to Odoo Model, through Webclient API

  • supports JSON-2 API with Odoo 19 and more recent

  • supports external API JSON-RPC as alternative

  • compatible with Odoo 9 to 19

  • single file odooly.py, no external dependency

  • helpers for search, for data model introspection, etc…

  • simplified syntax for search domain

  • entire API accessible on the Client.env environment

  • can be imported and used as a library: from odooly import Client

  • supports Python 3.8 and more recent

Interactive use

Launch without any configuration. It connects to the Odoo server, local or remote:

~$ odooly --server https://demo.odoo.com/

Or:

~$ odooly --server http://127.0.0.1:8069/

Environments can also be declared in odooly.ini:

[DEFAULT]
scheme = http
host = localhost
port = 8069
database = odoo
username = admin

[demo]
username = demo
password = demo
protocol = web

[demo_jsonrpc]
username = demo
password = demo
protocol = jsonrpc

[local]
scheme = local
options = -c /path/to/odoo-server.conf --without-demo all

Connect to the Odoo server:

~$ odooly --list
~$ odooly --env demo

This is a sample session:

>>> env['res.users']
<Model 'res.users'>
>>> env['res.users'].search_count()
4
>>> crons = env['ir.cron'].with_context(active_test=False).search([])
>>> crons.read('active name')
[{'active': True, 'id': 5, 'name': 'Calendar: Event Reminder'},
 {'active': False, 'id': 4, 'name': 'Mail: Fetchmail Service'}]
>>> #
>>> env.modules('delivery')
{'uninstalled': ['delivery', 'website_sale_delivery']}
>>> env.upgrade('base')
1 module(s) selected
42 module(s) to process:
  to upgrade    account
  to upgrade    account_chart
  to upgrade    account_tax_include
  to upgrade    base
  ...
>>> #

Command line arguments

There are few arguments to query Odoo models from the command line. Although it is quite limited:

~$ odooly --help

Usage: odooly.py [options] [search_term_or_id [search_term_or_id ...]]

Inspect data on Odoo objects.  Use interactively or query a model (-m) and
pass search terms or ids as positional parameters after the options.

Options:
  --version             show program's version number and exit
  -h, --help            show this help message and exit
  -l, --list            list sections of the configuration
  --env=ENV             read connection settings from the given section
  -c CONFIG, --config=CONFIG
                        specify alternate config file (default: 'odooly.ini')
  --server=SERVER       full URL of the server (default:
                        http://localhost:8069/web)
  -d DB, --db=DB        database
  -u USER, --user=USER  username
  -p PASSWORD, --password=PASSWORD
                        password, or it will be requested on login
  --api-key=API_KEY     API Key for JSON-2 or JSON-RPC

  -m MODEL, --model=MODEL
                        the type of object to find
  -f FIELDS, --fields=FIELDS
                        restrict the output to certain fields (multiple
                        allowed)
  -i, --interact        use interactively; default when no model is queried
  -v, --verbose         verbose
$ #

Example:

$ odooly -d demo -m res.partner -f name -f lang 1
"name","lang"
"Your Company","en_US"
$ odooly -d demo -m res.groups -f full_name 'id > 0'
"full_name"
"Administration / Access Rights"
"Administration / Configuration"
"Human Resources / Employee"
"Usability / Multi Companies"
"Usability / Extended View"
"Usability / Technical Features"
"Sales Management / User"
"Sales Management / Manager"
"Partner Manager"

Metadata

Release files for Odooly 2.6.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for Odooly 2.6.0
File Size Uploaded Provenance Actions
odooly-2.6.0.tar.gz 68.5 kB Without provenance Details for odooly-2.6.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for Odooly 2.6.0
File Interpreter ABI Platform Actions
odooly-2.6.0-py3-none-any.whl Python 3 none any Details for odooly-2.6.0-py3-none-any.whl

Total release size: 101.5 kB

Release files / odooly-2.6.0.tar.gz

Download URL odooly-2.6.0.tar.gz
Size 68.5 kB
Tags Source
SHA-256 checksum
How to use checksums
0c1d2a2e592d03208ff7516fd9f601db0ae8eb9964fe4a138ea14606964c089f
BLAKE2b-256 checksum
How to use checksums
498cf6380062f79654e10de60b1f6870b38bc6fb369b40590681acd65d11de8e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.13.12

Release files / odooly-2.6.0-py3-none-any.whl

Download URL odooly-2.6.0-py3-none-any.whl
Size 33.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
543dbb48dfe88dc1370d40d81e637733d9f5c7340805e283119a361d61ab4882
BLAKE2b-256 checksum
How to use checksums
8049afb712fbf452c663aed573fff101e2a6dbf34fd03b43801e5487525fcf18
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.13.12

Security for Odooly 2.6.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

2.6.0 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page