tinyerp / erppeek

A versatile tool for Odoo / OpenERP. *** Forked as Odooly ⟶
https://github.com/tinyerp/odooly
Other
171 stars 99 forks source link

Improve command line output #33

Closed florentx closed 10 years ago

florentx commented 10 years ago

Currently we get (from README.rst):

$ erppeek -d demo -m res.partner -f name -f lang 1
[{'id': 1, 'lang': 'en_US', 'name': 'Your Company'}]

$ erppeek -d demo -m res.groups -f full_name 'id > 0'
[{'full_name': 'Administration / Access Rights', 'id': 1},
 {'full_name': 'Administration / Configuration', 'id': 2},
 {'full_name': 'Human Resources / Employee', 'id': 3},
 {'full_name': 'Usability / Multi Companies', 'id': 4},
 {'full_name': 'Usability / Extended View', 'id': 5},
 {'full_name': 'Usability / Technical Features', 'id': 6},
 {'full_name': 'Sales Management / User', 'id': 7},
 {'full_name': 'Sales Management / Manager', 'id': 8},
 {'full_name': 'Partner Manager', 'id': 9}]

But it would be better to have something tabular or CSV compatible.

matrixise commented 10 years ago

You can use PrettyTable. Very useful

florentx commented 10 years ago

Thank you for the suggestion, I'll give a look.

florentx commented 10 years ago

I like PrettyTable, but I will stick to CSV output:

I think it is trivial to write a wrapper script which combines ERPpeek and PrettyTable.

florentx commented 10 years ago

released with version 1.5.3