İçereği Atla
Menü
Bu soru işaretlendi
1 Cevapla
1082 Görünümler

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
Vazgeç
En İyi Yanıt

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
Vazgeç
İlgili Gönderiler Cevaplar Görünümler Aktivite
2
Nis 24
7110
1
Tem 25
559
5
May 25
17966
0
Nis 25
1005
1
Nis 25
1463