Skip to Content
Menu
You need to be registered to interact with the community.
This question has been flagged
2 Odgovori
2367 Prikazi

I created an email template and automated action to send alert whenever an leave/timeoff is approved. I can see the mails in odoo emails section. There's a send now button. How can it be send automatically whenever leave approved.

Avatar
Opusti

can you share the code?

Best Answer

There is force_send=True option to send emails immediately (when you send email from code). But I don't see this option available in Automated Action - send email.
Try to choose Action To Do - Exectute Python Code:

email_template = env['mail.template'].browse(your_email_template_id)
email_template.send_mail(record.id, force_send=True)

Avatar
Opusti
Avtor Best Answer

no code, only odoo GUI config.

This forum is not letting to post screenshots too. Is there anyway i can share screenshots.

Avatar
Opusti
Related Posts Odgovori Prikazi Aktivnost
1
apr. 23
2838
0
avg. 23
1418
1
okt. 15
7363
3
feb. 18
7716
5
jul. 25
2599