Odoo Help

Welcome!

This community is for beginners and experts willing to share their Odoo knowledge. It's not a forum to discuss ideas, but a knowledge base of questions and their answers.

0

[Solved] Many2one declaration

By
maximize
on 3/11/15, 10:38 PM 874 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

 

3

Vasanth

--Vasanth--
3458
| 5 3 8
Pondicherry, India
--Vasanth--
Vasanth
On 3/12/15, 1:34 AM

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

0
maximize
On 3/12/15, 2:51 AM

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

Your Answer

Please try to give a substantial answer. If you wanted to comment on the question or answer, just use the commenting tool. Please remember that you can always revise your answers - no need to answer the same question twice. Also, please don't forget to vote - it really helps to select the best questions and answers!

About This Community

This community is for professionals and enthusiasts of our products and services. Read Guidelines

Question tools

1 follower(s)

Stats

Asked: 3/11/15, 10:38 PM
Seen: 874 times
Last updated: 3/16/15, 8:10 AM