Hi
I am still trying to get ERPNext to generate a certificate for me.
I had a look at the code that is generating the “Report card” and I hacked / duplicated that
together with its own HTML file to yield a resonable looking certificate. But I did that by hijacking the “Report Card” button top right. I now want to give that proper function back
to that button and create another button that says : “Print Certificate” I did that by adding
a “set_secondary_action” to the refresh: function code in
student_report_generating_tool.js
Now, when I go to Student Report Generating Tool in Education, the doc does not render
properly. It halts with the SAVE button visible.
No error in the erro_log.
Could someone please provide some guidance ?
I am using
ERPNext: v12.28.0 (version-12)
Frappe Framework: v12.25.0 (version-12
refresh: function(frm) {
frm.disable_save();
frm.page.clear_indicator();
frm.page.set_primary_action(__('Print Report Card'), () => {
let url = "/api/method/erpnext.education.doctype.student_report_generation_tool.student_report_generation_tool.preview_report_card";
open_url_post(url, {"doc": frm.doc}, true);
});
frm.page.set_secondary_action(__('Print Certificate'), () => {
let url1 = "/api/method/erpnext.education.doctype.student_report_generation_tool.student_report_generation_tool.preview_certificate";
open_url_post(url1, {"doc": frm.doc), true);
});
},