跳至內容
選單
此問題已被標幟
1 回覆
1177 瀏覽次數

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

頭像
捨棄
最佳答案

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)
頭像
捨棄
相關帖文 回覆 瀏覽次數 活動
2
4月 24
7259
1
7月 25
744
5
5月 25
18169
0
4月 25
1062
1
4月 25
1553