erpnext override event listener
if(cur_frm && cur_frm.doctype===doctype && cur_frm.events[fieldname]) {
delete cur_frm.events[fieldname];
}
// for debuging
console.log(doctype, fieldname, cur_frm);
if(cur_frm && cur_frm.cscript && cur_frm.cscript[fieldname]) {
delete cur_frm.cscript[fieldname];
}