Skip to Content
Menu
Musisz się zarejestrować, aby móc wchodzić w interakcje z tą społecznością.
To pytanie dostało ostrzeżenie
1 Odpowiedz
7787 Widoki

How can we access currently logined user id in openerp ?

Awatar
Odrzuć

can u elaborate more where u want user_id

Najlepsza odpowiedź

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
Awatar
Odrzuć
Powiązane posty Odpowiedzi Widoki Czynność
1
mar 15
7492
1
lis 24
2556
4
kwi 18
8728
0
paź 16
4171
0
lis 15
3086