I want to find user by user's email. And here is my code but i get no result from it.
user = request.env["res.users"].search([('login', 'ilike', email)])
Odoo is the world's easiest all-in-one management software.
It includes hundreds of business apps:
I want to find user by user's email. And here is my code but i get no result from it.
user = request.env["res.users"].search([('login', 'ilike', email)])
Hello,
You will try this
user = request.env["res.users"].search([('login', '=', email)])
Thank you,
thanks for your reply, i have already tried your solution but it's not giving me any user.
hello
just use email.encode('utf-8') instead of email here [('login','=',email)] , as the email have some special character in your case.
Cree una cuenta para poder utilizar funciones exclusivas e interactuar con la comunidad.
InscribirsePublicaciones relacionadas | Respuestas | Vistas | Actividad | |
---|---|---|---|---|
|
1
jul 25
|
365 | ||
Search a message
Resuelto
|
|
1
feb 25
|
1194 | |
|
0
sept 23
|
2138 | ||
|
2
jun 23
|
3885 | ||
|
1
ago 22
|
12657 |