Passa al contenuto
Menu
È necessario essere registrati per interagire con la community.
La domanda è stata contrassegnata
1 Rispondi
7795 Visualizzazioni

How can we access currently logined user id in openerp ?

Avatar
Abbandona

can u elaborate more where u want user_id

Risposta migliore

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
Avatar
Abbandona
Post correlati Risposte Visualizzazioni Attività
1
mar 15
7492
1
nov 24
2559
4
apr 18
8728
0
ott 16
4172
0
nov 15
3087