Versatile tool for browsing OpenERP data
Project description
Download the latest release from PyPI:
pip install -U erppeek
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 6.1
the module can be imported and used as a library: from erppeek import Client
supports Python 3 and Python 2 (>= 2.5)
1. Command line arguments
See the introduction on this page or:
erppeek --help
2. Interactive use
Edit erppeek.ini and declare the environment(s):
[DEFAULT] host = localhost port = 8069 database = openerp username = admin [demo] username = demo password = demo
Connect to the OpenERP server:
erppeek --list erppeek --env demo
This is a sample session:
demo >>> model('res.users') <Model 'res.users'> demo >>> client.ResUsers is model('res.users') True demo >>> client.ResUsers.count() 4 demo >>> read('ir.cron', ['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}] demo >>> demo >>> client.modules('delivery') {'uninstalled': ['delivery', 'sale_delivery_report']} demo >>> 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 ... demo >>>
Main commands:
search(obj, domain) search(obj, domain, offset=0, limit=None, order=None) # Return a list of IDs count(obj, domain) # Count the matching objects read(obj, ids, fields=None) read(obj, domain, fields=None) read(obj, domain, fields=None, offset=0, limit=None, order=None) # Return values for the fields models(name) # List models matching pattern model(name) # Return a Model instance keys(obj) # List field names of the model fields(obj, names=None) # Return details for the fields field(obj, name) # Return details for the field access(obj, mode='read') # Check access on the model do(obj, method, *params) # Generic 'object.execute' wizard(name) # Return the 'id' of a new wizard wizard(name_or_id, datas=None, action='init') # Generic 'wizard.execute' exec_workflow(obj, signal, id) # Trigger workflow signal client # Client object, connected client.login(user) # Login with another user client.connect(env) # Connect to another env. client.modules(name) # List modules matching pattern client.upgrade(module1, module2, ...) # Upgrade the modules
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.