Skip to Content
Meniu
Trebuie să fiți înregistrat pentru a interacționa cu comunitatea.
Această întrebare a fost marcată
1 Răspunde
7804 Vizualizări

How can we access currently logined user id in openerp ?

Imagine profil
Abandonează

can u elaborate more where u want user_id

Cel mai bun răspuns

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
Imagine profil
Abandonează
Related Posts Răspunsuri Vizualizări Activitate
1
mar. 15
7499
1
nov. 24
2585
4
apr. 18
8733
0
oct. 16
4184
0
nov. 15
3089