This question has been flagged
2 Replies
3073 Views

Hello, i suddenly encountered this error after i changed my  class <class_name> (osv.osv) TO class <class_name> (models.Model)

and fields.many2one to fields.Many2one  

Error :

CRITICAL db_db openerp.modules.module: Couldn't load module <module name>

CRITICAL db_db openerp.modules.module: 'Many2one' object has no attribute 'to_field'

thanks in advance

 

Avatar
Discard
Best Answer

hi,

For changing like this,please check that are you changing the signature also

In osv.osv:

 'categ_id': fields.many2one('product.category'),

in models.Model:

categ_id = fields.Many2one('product.category')

 

please check this changes are done correctly

Avatar
Discard
Author Best Answer

Thanks for your swift reply. i have successfully converted my custom module to v8 :)

Avatar
Discard