From fa8f7628050dadfe3ecaae0a85d1107e8f3d6ff6 Mon Sep 17 00:00:00 2001 From: Vishal Date: Mon, 6 Nov 2017 12:28:17 +0530 Subject: [PATCH] [fix] Grant Application Url added in message body on sendmail --- .../doctype/grant_application/grant_application.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/erpnext/non_profit/doctype/grant_application/grant_application.py b/erpnext/non_profit/doctype/grant_application/grant_application.py index 9f118c8537..75fdeaf12f 100644 --- a/erpnext/non_profit/doctype/grant_application/grant_application.py +++ b/erpnext/non_profit/doctype/grant_application/grant_application.py @@ -6,6 +6,7 @@ from __future__ import unicode_literals import frappe from frappe.website.website_generator import WebsiteGenerator from frappe.contacts.address_and_contact import load_address_and_contact +from frappe.utils import get_url class GrantApplication(WebsiteGenerator): _website = frappe._dict( @@ -43,17 +44,17 @@ def assessment_result(title, assessment_scale, note): @frappe.whitelist() def send_grant_review_emails(grant_application): grant = frappe.get_doc("Grant Application", grant_application) - + url = get_url('grant-application/{0}'.format(grant_application)) frappe.sendmail( recipients= grant.assessment_manager, sender=frappe.session.user, subject=grant.title, - message='

Please Review this grant application


' , + message='

Please Review this grant application


'+url, reference_doctype=grant.doctype, reference_name=grant.name ) grant.status = "In Progress" - meeting.save() + grant.save() - frappe.msgprint(_("Invitation Sent")) + frappe.msgprint(_("Review Invitation Sent"))