erppeek
erppeek copied to clipboard
Allow scripting
Use case: run non-interactively a bunch of commands against Odoo...
This would allow things like:
#!bin/erppeek
users = model('res.users').browse()
for user in users:
print user.login
You can achieve it with a minimum of boilerplate in your script, to load the configuration and build the Client instance.
It assumes that you have an erppeek.ini file in your current directory with a section [demo]
#! /usr/bin/env python
import erppeek
client = erppeek.Client.from_config('demo')
model = client.model
users = model('res.users').browse()
for user in users:
print(user.login)