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
- Kirjanpito
- Varastointi
- PoS
- Project
- MRP
Tämä kysymys on merkitty
2
Vastaukset
24229
Näkymät
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
Nautitko keskustelusta? Älä vain lue, vaan osallistu!
Luo tili jo tänään nauttiaksesi yksinoikeusominaisuuksista ja osallistuaksesi mahtavaan yhteisöömme!
RekisteröidyAiheeseen liittyviä artikkeleita | Vastaukset | Näkymät | Toimenpide | |
---|---|---|---|---|
|
3
toukok. 25
|
2396 | ||
|
0
jouluk. 23
|
2248 | ||
|
1
heinäk. 23
|
2227 | ||
|
0
heinäk. 22
|
1816 | ||
Odoo? Why this new name?
Ratkaistu
|
|
3
syysk. 21
|
21567 |
Refer this: http://bit.ly/get-current-logged-in-user-id-in-odoo