Перейти к содержимому
Меню
Чтобы взаимодействовать с сообществом, необходимо зарегистрироваться.
Этот вопрос был отмечен
1 Ответить
7803 Представления

How can we access currently logined user id in openerp ?

Аватар
Отменить

can u elaborate more where u want user_id

Лучший ответ

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
Аватар
Отменить
Related Posts Ответы Просмотры Активность
1
мар. 15
7497
1
нояб. 24
2577
4
апр. 18
8732
0
окт. 16
4184
0
нояб. 15
3089