Skip to main content

Versatile tool for browsing Odoo / OpenERP data

Project description

Download and install the latest release:

pip install -U erppeek

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

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

Overview

ERPpeek carries three completing uses:

  1. with command line arguments

  2. as an interactive shell

  3. as a client library

Key features:

  • single executable erppeek.py, no external dependency

  • wrappers for search+read, for data model introspection, etc…

  • simpler syntax for domain and fields

  • full API accessible on the Client object for OpenERP 5.0 through Odoo 11.0

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

  • supports Python 3 and Python 2.7

Command line arguments

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

$ erppeek --help
Usage: erppeek [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: 'erppeek.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:

$ erppeek -d demo -m res.partner -f name -f lang 1
"name","lang"
"Your Company","en_US"
$ erppeek -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 erppeek.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:

erppeek --list
erppeek --env demo

This is a sample session:

>>> model('res.users')
<Model 'res.users'>
>>> model('res.users').count()
4
>>> model('ir.cron').read(['active = False'], 'active function')
[{'active': False, 'function': 'run_mail_scheduler', 'id': 1},
 {'active': False, 'function': 'run_bdr_scheduler', 'id': 2},
 {'active': False, 'function': 'scheduled_fetch_new_scans', 'id': 9}]
>>> #
>>> client.modules('delivery')
{'uninstalled': ['delivery', 'sale_delivery_report']}
>>> client.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

ERPpeek-1.7.1.tar.gz (56.2 kB view details)

Uploaded Source

Built Distribution

ERPpeek-1.7.1-py2.py3-none-any.whl (23.0 kB view details)

Uploaded Python 2 Python 3

File details

Details for the file ERPpeek-1.7.1.tar.gz.

File metadata

  • Download URL: ERPpeek-1.7.1.tar.gz
  • Upload date:
  • Size: 56.2 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 ERPpeek-1.7.1.tar.gz
Algorithm Hash digest
SHA256 0c30bdea453fd5daff1f40e508b919035e51004588dc56dc4c17349477d7e65f
MD5 ddae3d32a90621f3f64627416c36ea27
BLAKE2b-256 a8d668fc37536809e7397eb2bda8319ad68f339bee8006b078dbe8febeb53c30

See more details on using hashes here.

Provenance

File details

Details for the file ERPpeek-1.7.1-py2.py3-none-any.whl.

File metadata

  • Download URL: ERPpeek-1.7.1-py2.py3-none-any.whl
  • Upload date:
  • Size: 23.0 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 ERPpeek-1.7.1-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 5db9f4c758cac025c5c1b96418ef4ec1db604a2f9365ed6f1f893af38ce83ee1
MD5 521f53c6f1b79bf273c767392ef35a67
BLAKE2b-256 3e5c2867e46f03d2fcc3d014a02eeb11ec55f3f8d9eddddcc5578ae8457f84f8

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