Skip to Content
Menu
Musisz się zarejestrować, aby móc wchodzić w interakcje z tą społecznością.
To pytanie dostało ostrzeżenie
3 Odpowiedzi
7384 Widoki

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.

Awatar
Odrzuć
Najlepsza odpowiedź

To get email id from user use the following code

email = user.partner_id.email

Awatar
Odrzuć
Najlepsza odpowiedź

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.

Awatar
Odrzuć
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

Powiązane posty Odpowiedzi Widoki Czynność
1
lut 22
3288
2
kwi 21
9844
3
lis 19
5042
0
paź 19
3892
0
lip 19
4900