Bỏ qua để đến Nội dung
Menu
Câu hỏi này đã bị gắn cờ
1 Trả lời
1129 Lượt xem

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

Ảnh đại diện
Huỷ bỏ
Câu trả lời hay nhấ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)
Ảnh đại diện
Huỷ bỏ
Bài viết liên quan Trả lời Lượt xem Hoạt động
2
thg 4 24
7198
1
thg 7 25
667
5
thg 5 25
18115
0
thg 4 25
1043
1
thg 4 25
1523