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
Overview
ERPpeek carries three completing uses:
with command line arguments
as an interactive shell
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 8.0
the module can be imported and used as a library: from erppeek import Client
supports Python 3 and Python 2 (>= 2.6)
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 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 "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 = openerp username = admin options = -c /path/to/openerp-server.conf --without-demo all [demo] username = demo password = demo [local] scheme = local
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
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Hashes for ERPpeek-1.6.3-py2.py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7de0af5d2213de9fe5e27d05368d35f2d6e98a78afc8c59f7ec7a3f7da98b168 |
|
MD5 | ddb5d0dbc0fdd409673f8139703d3115 |
|
BLAKE2b-256 | b983faf0407fe005c82d073a885dfb461971c443b313acd5d23f695f0959ca09 |