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
- Účtovníctvo
- Sklady
- PoS
- Project
- MRP
This question has been flagged
            
                2
                
                    Replies
                
            
        
        
            
                25072
                
                    Zobrazenia
                
            
        
    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
Enjoying the discussion? Don't just read, join in!
Create an account today to enjoy exclusive features and engage with our awesome community!
Registrácia| Related Posts | Replies | Zobrazenia | Aktivita | |
|---|---|---|---|---|
|  | 3 máj 25  | 3380 | ||
|  | 0 dec 23  | 3013 | ||
|  | 1 júl 23  | 3048 | ||
|  | 0 júl 22  | 2401 | ||
| 
            
                Odoo? Why this new name?
            
            
                    Solved
            
         |  | 3 sep 21  | 24011 | 
 
                        
Refer this: http://bit.ly/get-current-logged-in-user-id-in-odoo