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
- Comptabilité
- Inventaire
- PoS
- Project
- MRP
Cette question a été signalée
2
Réponses
25046
Vues
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
Vous appréciez la discussion ? Ne vous contentez pas de lire, rejoignez-nous !
Créez un compte dès aujourd'hui pour profiter de fonctionnalités exclusives et échanger avec notre formidable communauté !
S'inscrire| Publications associées | Réponses | Vues | Activité | |
|---|---|---|---|---|
|
|
3
mai 25
|
3357 | ||
|
|
0
déc. 23
|
2995 | ||
|
|
1
juil. 23
|
3028 | ||
|
|
0
juil. 22
|
2384 | ||
|
Odoo? Why this new name?
Résolu
|
|
3
sept. 21
|
23938 |
Refer this: http://bit.ly/get-current-logged-in-user-id-in-odoo