odoo18/addons_extensions/employee_bridge/data/mail_template.xml

42 lines
2.5 KiB
XML

<?xml version="1.0" encoding="UTF-8"?>
<odoo>
<record id="email_template_jod_form" model="mail.template">
<field name="name">JOD Form Email</field>
<field name="model_id" ref="employee_bridge.model_recruitment_employee_bridge"/>
<field name="email_from">{{ user.email_formatted or object.company_id.email or '' }}</field>
<field name="email_to">{{ object.work_email or object.private_email or object.employee_id.work_email or '' }}</field>
<field name="subject">Joining Onboarding Form - {{ object.employee_name or object.employee_id.name or '' }}</field>
<field name="body_html" type="html">
<div style="margin:0; padding:0; font-size:13px; line-height:1.7;">
<p>Dear <t t-esc="object.employee_name or object.employee_id.name or 'Candidate'"/>,</p>
<p>Welcome to <t t-esc="object.employee_id.company_id.name"/>.</p>
<p>
Please submit your employee joining details using the link below.
</p>
<p>
<a t-att-href="ctx.get('joining_form_link')" target="_blank"
style="background-color:#005580; color:#ffffff; padding:10px 18px; text-decoration:none; border-radius:4px; display:inline-block;">
Open Employee Joining Form
</a>
</p>
<t t-if="ctx.get('personal_docs') or ctx.get('education_docs') or ctx.get('previous_employer_docs') or ctx.get('other_docs')">
<p><strong>Attachments to Request</strong></p>
<t t-if="ctx.get('personal_docs')">
<p><strong>Personal Documents:</strong> <t t-esc="', '.join(ctx.get('personal_docs'))"/></p>
</t>
<t t-if="ctx.get('education_docs')">
<p><strong>Education Documents:</strong> <t t-esc="', '.join(ctx.get('education_docs'))"/></p>
</t>
<t t-if="ctx.get('previous_employer_docs')">
<p><strong>Previous Employer Documents:</strong> <t t-esc="', '.join(ctx.get('previous_employer_docs'))"/></p>
</t>
<t t-if="ctx.get('other_docs')">
<p><strong>Other Documents:</strong> <t t-esc="', '.join(ctx.get('other_docs'))"/></p>
</t>
</t>
<p>Regards,<br/>HR Team</p>
</div>
</field>
</record>
</odoo>