Ir al contenido
Menú
Se marcó esta pregunta
1 Responder
3881 Vistas

Hi,

I wanted to change the default content of mail template of leave approved and leave To Approve.

I tried it through 

Setting -> Technical -> Email -> Template

But I'm not able to get the template of leave approved and Leave To Approve Email.

can anyone help me to solve this issue?

Thanks In Advance!

Avatar
Descartar
Mejor respuesta

I don't know for the Enterprise version, but in the community Version, there is no specific email template for Leave Management.

Avatar
Descartar
Autor

ok. Now I have created email template for leave approval, but I don't know how to use that template. Can you please tell me how to use that custom template?

OK If you email template is created in a xml data file, you can use the following instructions in your python code:

template_id = self.env.ref('your_module_folder.your_external_email_template_id') template_id.send_mail(your_record_id,force_send=True)

Autor

Actually no. I have created it directly from Odoo UI. Technical -> Email -> Template -> Create

To use it easily in you python code, the best way is to create it in a xml data file.

Try to follow this documentation:

https://www.odoo.yenthevg.com/creating-mail-templates/

Autor

Ok Thanks. I'll try to do this.