commit
f81117d63c
|
|
@ -282,7 +282,6 @@ class website_hr_recruitment_applications(http.Controller):
|
||||||
]
|
]
|
||||||
|
|
||||||
applicant.write(applicant_data)
|
applicant.write(applicant_data)
|
||||||
|
|
||||||
template = request.env.ref('hr_recruitment_extended.email_template_post_onboarding_form_user_submit',
|
template = request.env.ref('hr_recruitment_extended.email_template_post_onboarding_form_user_submit',
|
||||||
raise_if_not_found=False)
|
raise_if_not_found=False)
|
||||||
group = request.env.ref('hr.group_hr_manager')
|
group = request.env.ref('hr.group_hr_manager')
|
||||||
|
|
@ -290,13 +289,15 @@ class website_hr_recruitment_applications(http.Controller):
|
||||||
email_values = {
|
email_values = {
|
||||||
'email_from': applicant.email_from,
|
'email_from': applicant.email_from,
|
||||||
'email_to': 'hr@ftprotech.com',
|
'email_to': 'hr@ftprotech.com',
|
||||||
'email_cc': [user.email for user in users if user.email != 'hr@ftprotech.com']
|
'email_cc': [user.email for user in users if user.email != 'hr@ftprotech.com' and user.employee_id.department_id.name == 'Human Resource']
|
||||||
}
|
}
|
||||||
# Use 'with_context' to override the email template fields dynamically
|
# Use 'with_context' to override the email template fields dynamically
|
||||||
template.sudo().send_mail(applicant.id, email_values=email_values,
|
template.sudo().send_mail(applicant.id, email_values=email_values,
|
||||||
force_send=True)
|
force_send=True)
|
||||||
|
|
||||||
return request.render("hr_recruitment_extended.thank_you_template")
|
return request.render("hr_recruitment_extended.thank_you_template",{
|
||||||
|
'applicant': applicant
|
||||||
|
})
|
||||||
|
|
||||||
def safe_date_parse(self,date_str):
|
def safe_date_parse(self,date_str):
|
||||||
try:
|
try:
|
||||||
|
|
|
||||||
|
|
@ -308,30 +308,22 @@
|
||||||
</strong>
|
</strong>
|
||||||
,
|
,
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
<t t-set="applicant_name" t-value="object.candidate_id.partner_name or 'Applicant'"/>
|
<t t-set="applicant_name" t-value="object.candidate_id.partner_name or 'Applicant'"/>
|
||||||
<t t-if="object.employee_code">
|
<t t-if="object.employee_code">
|
||||||
<t t-set="employee_code" t-value="object.employee_code"/>
|
<t t-set="employee_code" t-value="object.employee_code"/>
|
||||||
</t>
|
</t>
|
||||||
|
|
||||||
<p>
|
<p>
|
||||||
<t t-esc="applicant_name"/> has submitted the Joining Formalities (JOD) Form. Please click the link below to review the details.
|
<t t-esc="applicant_name"/> has submitted the Joining Formalities (JOD) Form. Please click the link below to review the details.
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
|
<t t-set="base_url" t-value="object.env['ir.config_parameter'].sudo().get_param('web.base.url')"/>
|
||||||
<t t-set="base_url"
|
<!-- FIXED LINE: Using proper string concatenation -->
|
||||||
t-value="object.env['ir.config_parameter'].sudo().get_param('web.base.url')"/>
|
<t t-set="form_url" t-value="base_url + '/odoo/hr.applicant/' + str(object.id)"/>
|
||||||
<t t-set="form_url"
|
|
||||||
t-value="base_url + '/odoo/hr.applicant/' % object.id"/>
|
|
||||||
|
|
||||||
<p style="text-align: center; margin-top: 20px;">
|
<p style="text-align: center; margin-top: 20px;">
|
||||||
<a t-att-href="form_url" target="_blank"
|
<a t-att-href="form_url" target="_blank" style="background-color: #007bff; color: #fff; padding: 10px 20px; text-decoration: none; font-weight: bold; border-radius: 5px; display: inline-block;">
|
||||||
style="background-color: #007bff; color: #fff; padding: 10px 20px; text-decoration: none;
|
|
||||||
font-weight: bold; border-radius: 5px; display: inline-block;">
|
|
||||||
Open Application
|
Open Application
|
||||||
</a>
|
</a>
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
<p>Best Regards,
|
<p>Best Regards,
|
||||||
<br/>
|
<br/>
|
||||||
<strong>
|
<strong>
|
||||||
|
|
@ -339,7 +331,6 @@
|
||||||
</strong>
|
</strong>
|
||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</field>
|
</field>
|
||||||
</record>
|
</record>
|
||||||
<record id="email_template_post_onboarding_form" model="mail.template">
|
<record id="email_template_post_onboarding_form" model="mail.template">
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue