Skip to Content
Menu
This question has been flagged
1 Atsakyti
7798 Rodiniai

How can we access currently logined user id in openerp ?

Portretas
Atmesti

can u elaborate more where u want user_id

Best Answer

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
Portretas
Atmesti
Related Posts Replies Rodiniai Veikla
1
kov. 15
7492
1
lapkr. 24
2569
4
bal. 18
8728
0
spal. 16
4180
0
lapkr. 15
3088