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
- Project
- MRP
신고된 질문입니다
2
답글
24451
화면
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
5월 25
|
2727 | ||
|
0
12월 23
|
2419 | ||
|
1
7월 23
|
2477 | ||
|
0
7월 22
|
1939 | ||
Odoo? Why this new name?
해결 완료
|
|
3
9월 21
|
21979 |
Refer this: http://bit.ly/get-current-logged-in-user-id-in-odoo