Skip ke Konten
Menu
Pertanyaan ini telah diberikan tanda
3 Replies
7357 Tampilan

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.

Avatar
Buang
Jawaban Terbai

To get email id from user use the following code

email = user.partner_id.email

Avatar
Buang
Jawaban Terbai

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.

Avatar
Buang
Penulis

@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

Post Terkait Replies Tampilan Aktivitas
1
Feb 22
3260
2
Apr 21
9802
3
Nov 19
5025
0
Okt 19
3849
0
Jul 19
4856