feat: add default Exit Questionnaire email template
This commit is contained in:
parent
7412accf6d
commit
235b707417
@ -0,0 +1,16 @@
|
||||
<h2>Exit Questionnaire</h2>
|
||||
<br>
|
||||
|
||||
<p>
|
||||
Dear {{ employee_name }},
|
||||
<br><br>
|
||||
|
||||
Thank you for the contribution you have made during your time at {{ company }}. We value your opinion and welcome the feedback on your experience working with us.
|
||||
Request you to take out a few minutes to fill up this Exit Questionnaire.
|
||||
|
||||
{% set web_form = frappe.db.get_value('HR Settings', 'HR Settings', 'exit_questionnaire_web_form') %}
|
||||
{% set web_form_link = frappe.utils.get_url(uri=frappe.db.get_value('Web Form', web_form, 'route')) %}
|
||||
|
||||
<br><br>
|
||||
<a class="btn btn-primary" href="{{ web_form_link }}" target="_blank">{{ _('Submit Now') }}</a>
|
||||
</p>
|
@ -312,3 +312,4 @@ erpnext.patches.v13_0.update_category_in_ltds_certificate
|
||||
erpnext.patches.v13_0.create_pan_field_for_india #2
|
||||
erpnext.patches.v14_0.delete_hub_doctypes
|
||||
erpnext.patches.v13_0.create_ksa_vat_custom_fields
|
||||
erpnext.patches.v14_0.add_default_exit_questionnaire_notification_template
|
@ -0,0 +1,27 @@
|
||||
import os
|
||||
|
||||
import frappe
|
||||
from frappe import _
|
||||
|
||||
|
||||
def execute():
|
||||
frappe.reload_doc("email", "doctype", "email_template")
|
||||
frappe.reload_doc("hr", "doctype", "hr_settings")
|
||||
|
||||
template = frappe.db.exists("Email Template", _("Exit Questionnaire Notification"))
|
||||
if not template:
|
||||
base_path = frappe.get_app_path("erpnext", "hr", "doctype")
|
||||
response = frappe.read_file(os.path.join(base_path, "exit_interview/exit_questionnaire_notification_template.html"))
|
||||
|
||||
template = frappe.get_doc({
|
||||
"doctype": "Email Template",
|
||||
"name": _("Exit Questionnaire Notification"),
|
||||
"response": response,
|
||||
"subject": _("Exit Questionnaire Notification"),
|
||||
"owner": frappe.session.user,
|
||||
}).insert(ignore_permissions=True)
|
||||
template = template.name
|
||||
|
||||
hr_settings = frappe.get_doc("HR Settings")
|
||||
hr_settings.exit_questionnaire_notification_template = template
|
||||
hr_settings.save()
|
@ -68,6 +68,8 @@ def set_default_settings(args):
|
||||
|
||||
hr_settings.send_interview_feedback_reminder = 1
|
||||
hr_settings.feedback_reminder_notification_template = _("Interview Feedback Reminder")
|
||||
|
||||
hr_settings.exit_questionnaire_notification_template = _("Exit Questionnaire Notification")
|
||||
hr_settings.save()
|
||||
|
||||
def set_no_copy_fields_in_variant_settings():
|
||||
|
@ -278,6 +278,11 @@ def install(country=None):
|
||||
records += [{'doctype': 'Email Template', 'name': _('Interview Feedback Reminder'), 'response': response,
|
||||
'subject': _('Interview Feedback Reminder'), 'owner': frappe.session.user}]
|
||||
|
||||
response = frappe.read_file(os.path.join(base_path, 'exit_interview/exit_questionnaire_notification_template.html'))
|
||||
|
||||
records += [{'doctype': 'Email Template', 'name': _('Exit Questionnaire Notification'), 'response': response,
|
||||
'subject': _('Exit Questionnaire Notification'), 'owner': frappe.session.user}]
|
||||
|
||||
base_path = frappe.get_app_path("erpnext", "stock", "doctype")
|
||||
response = frappe.read_file(os.path.join(base_path, "delivery_trip/dispatch_notification_template.html"))
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user