Přejít na obsah
Menu
You need to be registered to interact with the community.
This question has been flagged
1 Odpovědět
7780 Zobrazení

How can we access currently logined user id in openerp ?

Avatar
Zrušit

can u elaborate more where u want user_id

Nejlepší odpověď

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
Zrušit
Related Posts Odpovědi Zobrazení Aktivita
1
bře 15
7492
1
lis 24
2554
4
dub 18
8724
0
říj 16
4171
0
lis 15
3086