Skip to Content
Menu
This question has been flagged
2 Replies
3794 Views

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

Avatar
Discard

Did u mean current user id ?

Best Answer

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


Avatar
Discard