Odoo Help


How can I get the id of user

Michael Marroquin
on 11/1/16, 12:13 AM 339 views

How can I get the id of user with which he entered the system by python code.

Did u mean current user id ?

Shameem iWesabe
on 11/1/16, 3:33 AM

Nilmar Shereef

--Nilmar Shereef--
| 5 4 7
Calicut, India
--Nilmar Shereef--

Python Developer. Android Developer. .Net Developer

Nilmar Shereef
On 11/1/16, 4:43 AM

try this In new api:

            print self._uid

try this in old api:
            users = self.pool.get('res.users')

           current_user = users.browse(cr, uid, uid, context=context).id

           print current_user

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

1 follower(s)


Asked: 11/1/16, 12:13 AM
Seen: 339 times
Last updated: 11/1/16, 4:43 AM