-
Notifications
You must be signed in to change notification settings - Fork 7.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: add link to leave application in leave notification (#29316)
(cherry picked from commit b07c1f3) # Conflicts: # erpnext/patches.txt
- Loading branch information
1 parent
4a09dc4
commit b8d1436
Showing
3 changed files
with
27 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
17 changes: 17 additions & 0 deletions
17
erpnext/patches/v14_0/update_leave_notification_template.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
import os | ||
|
||
import frappe | ||
from frappe import _ | ||
|
||
|
||
def execute(): | ||
base_path = frappe.get_app_path("erpnext", "hr", "doctype") | ||
response = frappe.read_file(os.path.join(base_path, "leave_application/leave_application_email_template.html")) | ||
|
||
template = frappe.db.exists("Email Template", _("Leave Approval Notification")) | ||
if template: | ||
frappe.db.set_value("Email Template", template, "response", response) | ||
|
||
template = frappe.db.exists("Email Template", _("Leave Status Notification")) | ||
if template: | ||
frappe.db.set_value("Email Template", template, "response", response) |