Versatile tool for browsing OpenERP data
Project description
Download the latest release from PyPI:
pip install 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('users') ['res.users'] demo >>> count('res.users') 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 update: 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 model(name) # List models matching pattern 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
Changelog
0.8 (2012-04-24)
Fix help(client) and repr(…).
Add basic safeguards for argument types.
0.7 (2012-04-04)
Fix RuntimeError on connection.
0.6 (2012-04-03)
Support Python 3.
Return Client method instead of function when calling client.write or similar.
Fix the case where read() is called with a single id.
0.5 (2012-03-29)
Implement Client.__getattr__ special attribute to call any object method, like client.write(obj, values). This is somewhat redundant with client.execute(obj, 'write', values) and its interactive alias do(obj, 'write', values).
Add --write switch to enable unsafe helpers: write, create, copy and unlink.
Tolerate domain without square brackets, but show a warning.
Add long options --search for -s, --interact for -i.
0.4 (2012-03-28)
Workaround for sys.excepthook ignored, related to a Python issue.
0.3 (2012-03-26)
Add --config and --version switches.
Improve documentation with session examples.
Move the project from Launchpad to GitHub.
0.2 (2012-03-24)
Allow to switch user or database: methods client.login and client.connect.
Allow context= keyword argument.
Add access(...) method.
Add %(...)s formatting for the fields parameter of the read(...) method.
Refactor the interactive mode.
Many improvements.
Publish on PyPI.
0.1 (2012-03-14)
Initial release.
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
File details
Details for the file ERPpeek-0.8.tar.gz
.
File metadata
- Download URL: ERPpeek-0.8.tar.gz
- Upload date:
- Size: 13.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 516dc74c53ae3ac95128329345503d2325d456f7378e5b25896e77790544ebda |
|
MD5 | 62cc22245719ff1065b5303439810262 |
|
BLAKE2b-256 | 1f3def4c0e528083cc49e2e8feda3a27851bba15fea3ce8318df3320f913bdd6 |