mirror of
https://github.com/frappe/erpnext.git
synced 2026-05-14 18:51:21 +00:00
[fix] Minor changes in grant application
This commit is contained in:
@@ -13,15 +13,15 @@ frappe.ui.form.on('Grant Application', {
|
|||||||
frappe.contacts.clear_address_and_contact(frm);
|
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({
|
frappe.call({
|
||||||
method: "erpnext.non_profit.doctype.grant_application.grant_application.send_grant_review_emails",
|
method: "erpnext.non_profit.doctype.grant_application.grant_application.send_grant_review_emails",
|
||||||
args: {
|
args: {
|
||||||
grant_application: frm.doc.name
|
grant_application: frm.doc.name
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
});
|
||||||
});
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -36,16 +36,6 @@ def get_list_context(context):
|
|||||||
context.order_by = 'creation desc'
|
context.order_by = 'creation desc'
|
||||||
context.introduction ='<div>Grant Application List</div><br><a class="btn btn-primary" href="/my-grant?new=1">Apply for new Grant Application</a>'
|
context.introduction ='<div>Grant Application List</div><br><a class="btn btn-primary" href="/my-grant?new=1">Apply for new Grant Application</a>'
|
||||||
|
|
||||||
#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()
|
@frappe.whitelist()
|
||||||
@@ -61,7 +51,8 @@ def send_grant_review_emails(grant_application):
|
|||||||
reference_name=grant.name
|
reference_name=grant.name
|
||||||
)
|
)
|
||||||
|
|
||||||
grant.status = "In Progress"
|
grant.status = 'In Progress'
|
||||||
grant.save()
|
grant.save()
|
||||||
|
frappe.db.commit()
|
||||||
|
|
||||||
frappe.msgprint(_("Review Invitation Sent"))
|
frappe.msgprint(_("Review Invitation Sent"))
|
||||||
Reference in New Issue
Block a user