Odoo Help


current login user id

on 4/19/14, 9:07 AM 2,711 views

How can we access currently logined user id in openerp ?

can u elaborate more where u want user_id

Jagdish Panchal
on 4/19/14, 9:31 AM

Med Said BARA

--Med Said BARA--

| 5 5 7
--Med Said BARA--
Med Said BARA
On 4/19/14, 5:52 PM

For an example, look at the code in: ./addons/base_status/base_state.py

def _get_default_user(self, cr, uid, context=None):

    """ Gives current user id

        :param context: if portal not in context returns False


    if context is None:

        context = {}

    if not context or not context.get('portal'):

        return False

    return uid

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

0 follower(s)


Asked: 4/19/14, 9:07 AM
Seen: 2711 times
Last updated: 3/16/15, 8:10 AM