openerp-community team mailing list archive
-
openerp-community team
-
Mailing list archive
-
Message #02305
Re: [OERPLib] The 0.7.0 version has been released!
On 02/22/2013 04:18 PM, Sébastien ALIX wrote:
Hi,
Thank you!
I'm working on some "inspect" functionalities, your idea can be one of
them indeed. I will think about it :)
Thanks
In the meantime, to get information on a data model, you can do that:
oerp.get(<object_name>).fields_get()
Sure, but I was thinking of getting back an information which looks much
like the original py file
model = 'res.users'
print 'Model:',model
m_ids = oerp.get('ir.model').search([('model','=',model)])
field_ids = oerp.get('ir.model.fields').search([('model_id','in',m_ids)])
print'%-20s %-10s %-20s %-8s %-5s
%s'%('name','type','relation','required','size','field_description')
for m in oerp.get('ir.model.fields').browse(field_ids):
print'%-20s %-10s %-20s %-8s %-5s
%s'%(m.name,m.ttype,m.relation,m.required,m.size,m.field_description)
Regards,
Le Fri, 22 Feb 2013 11:40:41 +0100,
ferdinand <office@xxxxxxxxxx> a écrit :
On 02/19/2013 01:42 PM, Sébastien ALIX wrote:
Hello!
this is really a great extension.
another great feature would be a quick access to
* oerp.object_list()
* oerp.object_def(<object_name>) which shows the current object
attributes for the installed modules.
or do I miss something ?
References