From 0dbf00a28379c4b41c04eedf6d090488271ccfba Mon Sep 17 00:00:00 2001 From: Vishal Date: Fri, 1 Dec 2017 14:40:24 +0530 Subject: [PATCH] [fix] Minor changes in grant application --- .../grant_application/grant_application.js | 8 ++++---- .../grant_application/grant_application.py | 15 +++------------ 2 files changed, 7 insertions(+), 16 deletions(-) diff --git a/erpnext/non_profit/doctype/grant_application/grant_application.js b/erpnext/non_profit/doctype/grant_application/grant_application.js index e13fee9b5ad..d560804d6a7 100644 --- a/erpnext/non_profit/doctype/grant_application/grant_application.js +++ b/erpnext/non_profit/doctype/grant_application/grant_application.js @@ -13,15 +13,15 @@ frappe.ui.form.on('Grant Application', { frappe.contacts.clear_address_and_contact(frm); } - frm.add_custom_button(__("Send Grant Review Email"), function() { - if (frm.doc.status==="Received") { + if(frm.doc.status == 'Received'){ + frm.add_custom_button(__("Send Grant Review Email"), function() { frappe.call({ method: "erpnext.non_profit.doctype.grant_application.grant_application.send_grant_review_emails", args: { grant_application: frm.doc.name } }); - } - }); + }); + } } }); diff --git a/erpnext/non_profit/doctype/grant_application/grant_application.py b/erpnext/non_profit/doctype/grant_application/grant_application.py index b3fb1a9734d..6b9ba32477e 100644 --- a/erpnext/non_profit/doctype/grant_application/grant_application.py +++ b/erpnext/non_profit/doctype/grant_application/grant_application.py @@ -36,16 +36,6 @@ def get_list_context(context): context.order_by = 'creation desc' context.introduction ='
Grant Application List

Apply for new Grant Application' -#Assement Manager review grant on website and submit result -@frappe.whitelist(allow_guest=True) -def assessment_result(title, assessment_scale, note): - vote = frappe.get_doc("Grant Application", title) - vote.assessment_scale = assessment_scale - vote.note = note - vote.save() - frappe.db.commit() - return "Thank you for Assessment Review" - @frappe.whitelist() @@ -61,7 +51,8 @@ def send_grant_review_emails(grant_application): reference_name=grant.name ) - grant.status = "In Progress" + grant.status = 'In Progress' grant.save() + frappe.db.commit() - frappe.msgprint(_("Review Invitation Sent")) + frappe.msgprint(_("Review Invitation Sent")) \ No newline at end of file