تخطي للذهاب إلى المحتوى
القائمة
لقد تم الإبلاغ عن هذا السؤال
3 الردود
7410 أدوات العرض

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
فبراير 22
3307
2
أبريل 21
9867
3
نوفمبر 19
5070
0
أكتوبر 19
3913
0
يوليو 19
4926