odoo18/addons_extensions/requisitions/data/mail_templates.xml

73 lines
4.1 KiB
XML

<odoo>
<data>
<record id="mail_template_recruitment_requisition_notification" model="mail.template">
<field name="name">HR Requisition: Notification</field>
<field name="model_id" ref="requisitions.model_recruitment_requisition"/>
<field name="email_from">{{ object.requested_by.email_formatted or user.email_formatted }}</field>
<field name="email_to">{{ object.hr_manager_id.email }}</field>
<field name="subject">New Requisition Submitted: {{ object.name }}</field>
<field name="description">Notification sent to HR Manager when a new requisition is submitted.</field>
<field name="body_html" type="html">
<div style="margin: 0px; padding: 0px;">
<p style="margin: 0px; padding: 0px; font-size: 13px;">
Dear <t t-out="object.hr_manager_id.name or ''">John Doe</t>,
<br /><br />
A new requisition has been submitted for your review:
<ul>
<li><strong>Requisition Name:</strong> <t t-out="object.name or ''">New</t></li>
<li><strong>Department:</strong> <t t-out="object.department_id.name or ''">Sales</t></li>
<li><strong>Position Title:</strong> <t t-out="object.position_title or ''">Sales Manager</t></li>
<li><strong>Number of Positions:</strong> <t t-out="object.number_of_positions or 0">3</t></li>
<li><strong>Requested By:</strong> <t t-out="object.requested_by.name or ''">Emily Clark</t></li>
<li><strong>Requested On:</strong> <t t-out="object.requested_on or ''">2024-12-31</t></li>
</ul>
<br />
<t t-if="object.notes">
<strong>Notes:</strong> <t t-out="object.notes or ''">Requirement</t>
<br />
</t>
<br />
Please <a t-att-href="'%s/web#id=%d&amp;model=recruitment.requisition&amp;view_type=form' % (object.env['ir.config_parameter'].sudo().get_param('web.base.url'), object.id)" target="_blank">click here</a> to view the requisition details.
<br /><br />
Regards,
<br />
<t t-out="object.requested_by.name or ''">Emily Clark</t>
</p>
</div>
</field>
<field name="auto_delete" eval="True"/>
</record>
<odoo>
<data>
<record id="mail_template_recruitment_requisition_cancellation" model="mail.template">
<field name="name">Recruitment Requisition Cancellation</field>
<field name="model_id" ref="requisitions.model_recruitment_requisition"/>
<field name="email_from">{{ object.requested_by.email_formatted or user.email_formatted }}</field>
<field name="email_to">{{ object.hr_manager_id.email }}</field>
<field name="subject">Requisition Cancelled: {{ object.name }}</field>
<field name="body_html" type="html">
<div>
<p>Dear <t t-out="object.hr_manager_id.name or ''">HR Manager</t>,</p>
<p>The requisition <strong><t t-out="object.name or ''">New</t></strong> has been cancelled for the following reason:</p>
<p><t t-out="object.notes or 'No reason provided.'"/></p>
<p>
You can view the requisition details by clicking the link below:
<br/>
<a t-att-href="'/web#id=%d&amp;model=recruitment.requisition&amp;view_type=form' % object.id" style="color: #1a73e8; text-decoration: none;">
View Requisition
</a>
</p>
<p>Regards,</p>
<p><t t-out="object.requested_by.name or ''">Requested By</t></p>
</div>
</field>
</record>
</data>
</odoo>
</data>
</odoo>