diff --git a/erpnext/education/doctype/student/student.js b/erpnext/education/doctype/student/student.js index cadf272a1f..2c933e28b7 100644 --- a/erpnext/education/doctype/student/student.js +++ b/erpnext/education/doctype/student/student.js @@ -15,5 +15,15 @@ frappe.ui.form.on('Student', { } }; }) + }, + refresh: function(frm) { + if(!frm.is_new()) { + + // custom buttons + frm.add_custom_button(__('Accounting Ledger'), function() { + frappe.set_route('query-report', 'General Ledger', + {party_type:'Student', party:frm.doc.name}); + }); + } } -}); \ No newline at end of file +});