Repeating what I wrote in http://www.openerp.com/forum/post99425.html#p99425:
The problem seems to be in openerp/addons/base/ir/ir_model.py:
def _get_fields_type(self, cr, uid, context=None):
return sorted([(k,k) for k,v in fields.__dict__.iteritems()
if type(v) == types.TypeType
if issubclass(v, fields._column)
if v != fields._column
if not v._deprecated
if not issubclass(v, fields.function)])
if the last line is commented out:
def _get_fields_type(self, cr, uid, context=None):
return sorted([(k,k) for k,v in fields.__dict__.iteritems()
if type(v) == types.TypeType
if issubclass(v, fields._column)
if v != fields._column
if not v._deprecated])
#if not issubclass(v, fields.function)])
the compilation goes through. Obviously, my fix has broken some functionality,
but I hope somebody can use this investigation to give insight into the
underlying issue.
Regards,
Sameer
PS: To test Python compilation of ir_model.py (well, all Python files under the
openerp directory):
python /usr/lib64/python2.6/compileall.py openerp