Passa al contenuto
Menu
È necessario essere registrati per interagire con la community.
La domanda è stata contrassegnata
3 Risposte
7412 Visualizzazioni

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
Abbandona
Risposta migliore

To get email id from user use the following code

email = user.partner_id.email

Avatar
Abbandona
Risposta migliore

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
Abbandona
Autore

@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 correlati Risposte Visualizzazioni Attività
1
feb 22
3309
2
apr 21
9867
3
nov 19
5070
0
ott 19
3913
0
lug 19
4926