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 ='