How to get the current user id in an Odoo Web Controller ?
Odoo is the world's easiest all-in-one management software.
It includes hundreds of business apps:
- CRM
- e-Commerce
- Бухгалтерия
- Склад
- PoS
- Проекты
- MRP
Этот вопрос был отмечен
2
Ответы
25192
Представления
Hi Yenthe,
In Odoo 8, inside a web controller it doesn't work for me and I'm using that codes instead :
request.uid
or
request.session.uid
Regards,
Slim
Hi Slim,
You can get the user his id out of the environment its context like this:
http.request.env.context.get('uid')Regards,
Yenthe
Не оставайтесь в стороне – присоединяйтесь к обсуждению!
Создайте аккаунт сегодня, чтобы получить доступ к эксклюзивным функциям и стать частью нашего замечательного сообщества!
Регистрация| Похожие посты | Ответы | Просмотры | Активность | |
|---|---|---|---|---|
|
|
3
мая 25
|
3583 | ||
|
|
0
дек. 23
|
3205 | ||
|
|
1
июл. 23
|
3210 | ||
|
|
0
июл. 22
|
2606 | ||
|
Odoo? Why this new name?
Решено
|
|
3
сент. 21
|
24550 |
Refer this: http://bit.ly/get-current-logged-in-user-id-in-odoo