How can I activate a function when I click on Sales Order button?
Tried:
frappe.ui.form.on('Quotation', sales_order, function () {
console.log('Hello world!');
});
How can I activate a function when I click on Sales Order button?
Tried:
frappe.ui.form.on('Quotation', sales_order, function () {
console.log('Hello world!');
});
Try it
//Overwrite Make Sales Order funtion
cur_frm.cscript['Make Sales Order'] = function() {
alert('Hello world!');
//Orginal of funtion
frappe.model.open_mapped_doc({
method: "erpnext.selling.doctype.quotation.quotation.make_sales_order",
frm: cur_frm
})
}
Thank you very much!