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

estimation_id = fields.Many2many('res.users', default=lambda self:self.env.user, domain=lambda self: [("groups_id", "=",self.env.ref( "estimation.group_user_hide" ).id)], index=True, track_visibility='onchange', string='Estimation Asign To')

new_user_ids = [user.id for user in rec.estimation_id if user.id not in user_ids[rec.id]]

when i used above field that time i got selected user's user_id but i also need to get the email_id of user.

아바타
취소
베스트 답변

To get email id from user use the following code

email = user.partner_id.email

아바타
취소
베스트 답변

Hi Kiran,

Try following Code

new_user_ids = [user.email for user in rec.estimation_id if user.id not in user_ids[rec.id]]

Thanks.

아바타
취소
작성자

@Gokulakrishnan Hello i used your updated code but email don't sent on this email ids. you have any other solution to using same code and send the mail

관련 게시물 답글 화면 활동
1
2월 22
3534
2
4월 21
10134
3
11월 19
5250
0
10월 19
4208
0
7월 19
5184