콘텐츠로 건너뛰기
메뉴
커뮤니티에 참여하려면 회원 가입을 하시기 바랍니다.
신고된 질문입니다
2 답글
3113 화면

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.

관련 게시물 답글 화면 활동
1
7월 25
799
Search a message 해결 완료
1
2월 25
1439
0
9월 23
2400
2
6월 23
4341
1
8월 22
13014