Ubuntu IRC Council
The new Ubuntu IRC Council was announced this week and I am pleased to have been appointed to it. The Ubuntu project makes extensive use of the Freenode Internet Relay Chat network, with a team of operators doing a grand job keeping it all running smoothly for the thousands of users online each day. The IRC council has a few duties to assist the team, which you can read about in more details here https://wiki.ubuntu.com/IRC/IrcCouncil. Our first open team meeting will be on the 14th January at 11:00UTC in the #ubuntu-meeting channel, we have decided to keep the same meeting schedule as the previous council as it seems to work for most people. If you have any questions about the council do feel free to join our meeting or find us on Freenode IRC, we are all very approachable and here to help.
ERPpeek, a tool for browsing OpenERP data from the command line
We have been rather busy implementing OpenERP for a number of our customers and I have been tweaking and customising and extending it all over the place. It is a great fun product to work with, very flexible and Python is a really nice language to use. One thing I have been finding is that as a developer I really want to know more about the fieldnames and field values that are stored behind the scenes on an object, I want a command line utility to allow me to inspect a particular document and figure out why it displays what it displays etc. There might be one out there somewhere, but I figured it would be more fun to write my own, so I did. The best way to show how it works is with an example
./erppeek.py -d testdb -u admin -p admin -m res.users 1
in it’s simplist form that will connect to an openerp server running on localhost, (port 8069) with username admin and password admin to a database called testdb. It will then return all fields for the model res.users with id 1 (which will be the admin user)
./erppeek.py --server 'http://myserver.com:8069' -d testdb -u admin -p admin -m res.partner 1 3 5
This connects to a remote server called myserver.com and returns all fields from partners 1, 3 and 5
./erppeek.py --server 'http://myserver.com:8069' -d testdb -u admin -p admin -m res.partner -f name -f city 1 3 5
and now we are using the -f field parameter to return just the name and city (and it always returns the id as well) of those partners
./erppeek.py --server 'http://myserver.com:8069' -d testdb -u admin -p admin -m res.partner -f name -f city -s "name like School" -s "city = Southampton"
This time it is not relying on us passing in a list of object IDs, but it is doing a search of the res.partner objects where the name field contains ‘School’ and the city field is equal to Southampton.
To grab a copy of this small but handy little utility please download it from launchpad and make it executable. It works fine on Ubuntu, and should work on most platforms with Python. Do let me know in the comments what you think of it and what else you would like it to do.
Security note – this does at the moment get you to enter a password on the command line, which means the password will be available in your bash history and other users on your computer looking at processes you are running. This doesn’t bother me much as I am only using it on local development databases with trivial passwords anyway, but you have been warned. If someone wants to help fix that then great.

