feat: add link to leave application in leave notification (#29316)
This commit is contained in:
parent
3db8d908dc
commit
b07c1f3bf1
@ -23,3 +23,8 @@
|
||||
<td>{{status}}</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
{% set doc_link = frappe.utils.get_url_to_form('Leave Application', name) %}
|
||||
|
||||
<br><br>
|
||||
<a class="btn btn-primary" href="{{ doc_link }}" target="_blank">{{ _('Open Now') }}</a>
|
@ -326,3 +326,4 @@ erpnext.patches.v13_0.agriculture_deprecation_warning
|
||||
erpnext.patches.v14_0.delete_agriculture_doctypes
|
||||
erpnext.patches.v13_0.update_exchange_rate_settings
|
||||
erpnext.patches.v14_0.rearrange_company_fields
|
||||
erpnext.patches.v14_0.update_leave_notification_template
|
17
erpnext/patches/v14_0/update_leave_notification_template.py
Normal file
17
erpnext/patches/v14_0/update_leave_notification_template.py
Normal file
@ -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)
|
Loading…
x
Reference in New Issue
Block a user