Skip to main content

Versatile tool for browsing Odoo / OpenERP data

Project description

Download and install the latest release:

pip install -U odooly

Documentation and tutorial: http://odooly.readthedocs.org

CI tests: https://travis-ci.org/tinyerp/odooly

Overview

Odooly carries three completing uses:

  1. with command line arguments

  2. as an interactive shell

  3. as a client library

Key features:

  • provides an API very close to the Odoo API 8.0, through JSON-RPC and XML-RPC

  • compatible with OpenERP 6.1 through Odoo 12.0

  • single executable odooly.py, no external dependency

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

  • simplified syntax for search domain and fields

  • full API accessible on the Client.env environment

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

  • supports Python 3.4 and above, and Python 2.7

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/xmlrpc)
  -d DB, --db=DB        database
  -u USER, --user=USER  username
  -p PASSWORD, --password=PASSWORD
                        password, or it will be requested on login
  -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"

Interactive use

Edit odooly.ini and declare the environment(s):

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

[demo]
username = demo
password = demo
protocol = xmlrpc

[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
  ...
>>> #

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

Odooly-2.1.2.tar.gz (55.6 kB view details)

Uploaded Source

Built Distribution

Odooly-2.1.2-py2.py3-none-any.whl (24.2 kB view details)

Uploaded Python 2 Python 3

File details

Details for the file Odooly-2.1.2.tar.gz.

File metadata

  • Download URL: Odooly-2.1.2.tar.gz
  • Upload date:
  • Size: 55.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.12.1 pkginfo/1.4.2 requests/2.20.1 setuptools/40.6.2 requests-toolbelt/0.8.0 tqdm/4.28.1 CPython/3.6.7

File hashes

Hashes for Odooly-2.1.2.tar.gz
Algorithm Hash digest
SHA256 4b6a542ab7c40943efc41e8f509de7353d152a296759356896faac0b4850014b
MD5 160d9b3e924f0764e70947de41635c74
BLAKE2b-256 5195d40952a57b6558ef94c0f12811dad6edc7dded05edfb9dcff6f0c37f0244

See more details on using hashes here.

Provenance

File details

Details for the file Odooly-2.1.2-py2.py3-none-any.whl.

File metadata

  • Download URL: Odooly-2.1.2-py2.py3-none-any.whl
  • Upload date:
  • Size: 24.2 kB
  • Tags: Python 2, Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.12.1 pkginfo/1.4.2 requests/2.20.1 setuptools/40.6.2 requests-toolbelt/0.8.0 tqdm/4.28.1 CPython/3.6.7

File hashes

Hashes for Odooly-2.1.2-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 1f8b3181a2a5ed7d063295d39b347a0579e82e4e579fa77e28506e0d2cdf5dad
MD5 d0b685f691285b28428c0cd58c98c34e
BLAKE2b-256 a2fec2830bab70840d756f465410511476002379b98cd0c556ebe986a6cc5ca8

See more details on using hashes here.

Provenance

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page