Odoo Help


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.


many2one field is not working

on 6/9/14, 2:13 AM 840 views

I have used many2one fields in my custom module. When i try to update module, it gives an error like Programming error: there is no primary key for reference table res_user.

Generates error on following code.

'session_started_by': many2one('res.users','Operator')

can anyone please help me to fix the problem?

hello, can you please exlain this bug in details.. thanks.

Ali Ravani
on 6/9/14, 8:03 AM
On 6/9/14, 8:26 AM

I  think you missing fields, now check it.

'session_started_by': fields.many2one('res.users','Operator'),

Abhishek H Menon
On 6/10/14, 3:47 AM

from osv import fields, osv

class your_class(osv.osv):

        _name  = 'your.model'

        _columns = {

                session_started_by : fields.many2one('res.users', 'Operator'), 




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

2 follower(s)


Asked: 6/9/14, 2:13 AM
Seen: 840 times
Last updated: 3/16/15, 8:10 AM