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.


current login user id

on 4/19/14, 9:07 AM 1,491 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

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

0 follower(s)


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