Přejít na obsah
Menu
You need to be registered to interact with the community.
This question has been flagged
3 Odpovědi
7440 Zobrazení

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
Zrušit
Nejlepší odpověď

To get email id from user use the following code

email = user.partner_id.email

Avatar
Zrušit
Nejlepší odpověď

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
Zrušit
Autor

@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

Related Posts Odpovědi Zobrazení Aktivita
1
úno 22
3325
2
dub 21
9887
3
lis 19
5096
0
říj 19
3967
0
čvc 19
4968