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.
Create an account today to enjoy exclusive features and engage with our awesome community!
Üye Ol| İlgili Gönderiler | Cevaplar | Görünümler | Aktivite | |
|---|---|---|---|---|
|
1
Tem 25
|
1425 | |||
|
Search a message
Çözüldü
|
1
Şub 25
|
1805 | ||
|
0
Eyl 23
|
2708 | |||
|
2
Haz 23
|
4796 | |||
|
1
Ağu 22
|
13480 |
1. Use the live chat to ask your questions.
2. The operator answers within a few minutes.