Skip to Content
Menu
This question has been flagged
1413 Views

How to send email to a candidate on Application Refuse button click and link it to server action?

Avatar
Discard
Author

How can I link these two?
<record id="action_refuse_applicants" model="ir.actions.server">
<field name="name">Milti refuse Applicants</field>
<field name="model_id" ref="model_hr_applicant"/>
<field name="binding_model_id" ref="model_hr_applicant"/>
<field name="state">code</field>
<field name="code">records.archive_applicant()</field>
</record>

Email Template
<record id="job_applicant_email_template" model="mail.template">
<field name="name">Job refusal: Send by email</field>
<field name="model_id" ref="hr_recruitment_customizations_sanargy.model_hr_applicant"/>
<field name="email_from">${object.user_id.email_formatted |safe}</field>
<field name="email_to">${object.email_id}</field>
<field name="subject">Applied Job: (Ref ${object.job_id})</field>
<field name="body_html" type="html">
<div style="margin: 0px; padding: 0px;">
<p style="margin: 0px; padding: 0px; font-size: 13px;">
Dear ${object.partner_name}
<br /><br />
We appreciate your interest in ${object.company_id} and the time you’ve invested
in applying for the ${object.job_id} opening.

<br /><br />
We ended up moving forward with another candidate, but we’d like to thank you for talking
to our team and giving us the opportunity to learn about your skills and accomplishments.

<br /><br />
We will be advertising more positions in the coming months.
We hope you’ll keep us in mind and we encourage you to apply again.
<br /><br />
We wish you good luck with your job search and professional future endeavors.

<br /><br />
Best,
${object.user_id}
</p>
</div>
</field>
</record>

Related Posts Replies Views Activity
0
Nov 21
1405
1
Nov 24
1483
1
Nov 24
1188
2
Sep 24
1047
1
Aug 24
2451