Skip to Content
Menu
This question has been flagged
1 Reply
1905 Views

we want, that all sale order emails will automatically be sent CC to the currently logged in user.

i tried to overwrite _send_prepare_values of mail.mail but there i do not know how to find out the currently logged in user.

with self.env.user i only get the res_user with id=1 (odoobot) and not the currently logged in user.

any ideas?

Avatar
Discard
Best Answer

Hi,

You can store the current user in to filed and call it in template in email_cc

To get current user this code

current_user = fields.Many2one('res.users','Current User', default=lambda self: self.env.user)



Avatar
Discard