← Back to team overview

credativ team mailing list archive

Re: [Question #185195]: How to find function fields and related fields in a model using introspection?

 

Question #185195 on OpenERP Server changed:
https://answers.launchpad.net/openobject-server/+question/185195

    Status: Open => Answered

Stefan Rijnhart (Therp) proposed the following answer:
Hi Lionel,

this information is not encoded in the database. You will have to check
the instantiated model's column types

isinstance(model._columns[field], osv.fields.related)
and 
isinstance(model._columns[field], osv.fields.function)

Cheers,
Stefan.

-- 
You received this question notification because you are a member of
OpenERP Framework Experts, which is an answer contact for OpenERP
Server.