Skip to Content
मेन्यू
This question has been flagged
1 Reply
1073 Views

Greetings,

I'm trying to make an automation rule in order to send an email to the approvers when an approval request is submitted in the Approvals module, but I just can't figure it out how to set the approvers'email addresses as recipients.


Can you please help me?


ODOO 17

Avatar
Discard
Best Answer

Hi, would you mind sharing your code so that we can check it ?

This is an example to set email address as recipient.

template_id = self.env.ref('module_name.email_template_id').id
template = self.env['mail.template'].browse(template_id)
template['email_to'] = self.approvers_email
template.send_mail(self.id, force_send=True)
Avatar
Discard
Related Posts Replies Views Activity
2
अप्रैल 24
7104
1
जुल॰ 25
543
5
मई 25
17945
0
अप्रैल 25
997
1
अप्रैल 25
1457