Odoo Help


many2one field is not working

on 6/9/14, 2:13 AM 1,351 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'), 




About This Community

This platform 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.


Odoo Training Center

Access to our E-learning platform and experience all Odoo Apps through learning videos, exercises and Quizz.

Test it now

Question tools

2 follower(s)


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