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
- Kế toán
- Tồn kho
- PoS
- Project
- MRP
Câu hỏi này đã bị gắn cờ
2
Trả lời
24228
Lượt xem
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
Bạn có hứng thú với cuộc thảo luận không? Đừng chỉ đọc, hãy tham gia nhé!
Tạo tài khoản ngay hôm nay để tận hưởng các tính năng độc đáo và tham gia cộng đồng tuyệt vời của chúng tôi!
Đăng kýBài viết liên quan | Trả lời | Lượt xem | Hoạt động | |
---|---|---|---|---|
|
3
thg 5 25
|
2396 | ||
|
0
thg 12 23
|
2248 | ||
|
1
thg 7 23
|
2227 | ||
|
0
thg 7 22
|
1816 | ||
Odoo? Why this new name?
Đã xử lý
|
|
3
thg 9 21
|
21566 |
Refer this: http://bit.ly/get-current-logged-in-user-id-in-odoo