Hi,
I am very new to erpnext and I am trying my hand with writing a custom script. My custom script lives in my own app and it’s a simple script like this:
import frappe
@frappe.whitelist()
def get_custom_issue():
msgprint("From Py")
I put this script in ~/frappe-bench/apps/myapp. I then customize the built in Issue to have a javascript like this:
cur_frm.cscript.custom_issue = function(doc) {
alert("From JS");
cur_frm.call({
"method": 'myfolder.custom_issue.get_custom_issue',
callback: function(r) {
}
})
};
I have saved and reloaded the site, but then when I create a new Issue, it does not even pop up the alert. I have been looking at the logs on the server plus using web developer on Firefox to prod around to see errors are showing up but I see nothing. Can someone offer some help ? Thanks.