brotherton-erpnext/erpnext/patches/v13_0/add_default_interview_notification_templates.py

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

36 lines
1.2 KiB
Python
Raw Normal View History

feat: Tracking Multi-round interview (#25482) (#27724) * feat: Tracking Multi-round interview * fix: releted to scheduler event and formating * fix: job applicant UI/UX and conflicts * test: Interview Round * fix(test): Employee referral, Employee Onboarding, Job Offer * fix: sider * feat: set default value in Hr settings * feat: added validation for designation * test: Interview * test: Added validatiolns for skill * test: Interview feedback * fix: sider * fix: remove unnecessary validations and form label cleanups * chore: clean-up Interview Round and Interview Type doctype * fix: remove redundant Rating Value, only keep Rating * fix: update interview details on feedback submission - make interview feedback submission dialog minimizable * fix: show submit feedback button only if feedback doesn't exist * refactor: Interview and Feedback statuses and workflow * fix(HR Settings): clean up interview settings * refactor: Interview * refactor: Interview Feedback, remove unnecessary validations * chore: update notification messages * chore: remove unnecessary formatting changes in attendance list and leave application * refactor: Job Applicant to Interview mapping * chore: sorted imports * chore: sorted imports * fix: sider issues * fix: linter issues * fix: sider issues * fix: tests * fix: sorted imports * fix: tests, sider * fix: therapy plan test * fix: sider issues * feat: Include From Time and To Time fields in Interview for cleaner data * feat: Interview Calendar * fix: allow renaming masters * fix: add more fields to list view and standard filter * fix: validate overlapping interviews * fix: update tests * fix: linter issues * refactor: replace reminder messages with Email Templates * fix: sider issues Co-authored-by: Rucha Mahabal <ruchamahabal2@gmail.com> (cherry picked from commit 57e66f958cd57d66a6fd3b19f6cd3593eab63666) Co-authored-by: Anurag Mishra <32095923+Anurag810@users.noreply.github.com>
2021-10-01 07:45:40 +00:00
import os
import frappe
from frappe import _
def execute():
if not frappe.db.exists('Email Template', _('Interview Reminder')):
base_path = frappe.get_app_path('erpnext', 'hr', 'doctype')
response = frappe.read_file(os.path.join(base_path, 'interview/interview_reminder_notification_template.html'))
frappe.get_doc({
'doctype': 'Email Template',
'name': _('Interview Reminder'),
'response': response,
'subject': _('Interview Reminder'),
'owner': frappe.session.user,
}).insert(ignore_permissions=True)
if not frappe.db.exists('Email Template', _('Interview Feedback Reminder')):
base_path = frappe.get_app_path('erpnext', 'hr', 'doctype')
response = frappe.read_file(os.path.join(base_path, 'interview/interview_feedback_reminder_template.html'))
frappe.get_doc({
'doctype': 'Email Template',
'name': _('Interview Feedback Reminder'),
'response': response,
'subject': _('Interview Feedback Reminder'),
'owner': frappe.session.user,
}).insert(ignore_permissions=True)
hr_settings = frappe.get_doc('HR Settings')
hr_settings.interview_reminder_template = _('Interview Reminder')
hr_settings.feedback_reminder_notification_template = _('Interview Feedback Reminder')
hr_settings.save()