Skip to main content

Versatile tool for browsing OpenERP data

Project description

Download and install the latest release:

pip install -U erppeek

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

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 7.0

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

  • supports Python 3 and Python 2 (>= 2.5)

Command line arguments

There are few arguments to query OpenERP 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 OpenERP 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 to the XML-RPC server (default: http://localhost:8069)
  -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
[{'id': 1, 'lang': 'en_US', 'name': 'Your Company'}]
$ erppeek -d demo -m res.groups -f full_name 'id > 0'
[{'full_name': 'Administration / Access Rights', 'id': 1},
 {'full_name': 'Administration / Configuration', 'id': 2},
 {'full_name': 'Human Resources / Employee', 'id': 3},
 {'full_name': 'Usability / Multi Companies', 'id': 4},
 {'full_name': 'Usability / Extended View', 'id': 5},
 {'full_name': 'Usability / Technical Features', 'id': 6},
 {'full_name': 'Sales Management / User', 'id': 7},
 {'full_name': 'Sales Management / Manager', 'id': 8},
 {'full_name': 'Partner Manager', 'id': 9}]

Interactive use

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

[DEFAULT]
scheme = http
host = localhost
port = 8069
database = openerp
username = admin
options = -c /path/to/openerp-server.conf --without-demo all

[demo]
username = demo
password = demo

[local]
scheme = local

Connect to the OpenERP 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.5.2.tar.gz (49.9 kB view details)

Uploaded Source

Built Distribution

ERPpeek-1.5.2-py2.py3-none-any.whl (22.1 kB view details)

Uploaded Python 2 Python 3

File details

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

File metadata

  • Download URL: ERPpeek-1.5.2.tar.gz
  • Upload date:
  • Size: 49.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for ERPpeek-1.5.2.tar.gz
Algorithm Hash digest
SHA256 c65e0c8c5746ae948e7b7bd2f123bc7656771a922b78aad0eee2252744a78fa8
MD5 59a03933c6fb02a5c88349ece7c49fe0
BLAKE2b-256 7abaa0536c4d398a9cb2ade92677d98e49257d8bbb24f4d0288d835d96808a2e

See more details on using hashes here.

Provenance

File details

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

File metadata

File hashes

Hashes for ERPpeek-1.5.2-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 b324ac065d3eeb2b697aad93a5da40430ad46e83852f238b402cbaa03260dac9
MD5 f5fd3665be98912a07578b6d657e848a
BLAKE2b-256 986e33c845fdcad3a6e57535e21e638f1ffd83e4e334934af1ef3a254c56894a

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