跳至内容
菜单
此问题已终结
3 回复
7405 查看

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
2月 22
3306
2
4月 21
9866
3
11月 19
5068
0
10月 19
3910
0
7月 19
4923