[minor] removed cur_frm and added frappe.ui.form.on (#8803)
This commit is contained in:
parent
156eef1907
commit
5886aafbae
@ -1,13 +1,14 @@
|
|||||||
// Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors
|
// Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors
|
||||||
// License: GNU General Public License v3. See license.txt
|
// License: GNU General Public License v3. See license.txt
|
||||||
|
|
||||||
$.extend(cur_frm.cscript, {
|
frappe.ui.form.on("Price List", {
|
||||||
refresh: function() {
|
refresh: function(frm) {
|
||||||
cur_frm.add_custom_button(__("Add / Edit Prices"), function() {
|
let me = this;
|
||||||
|
frm.add_custom_button(__("Add / Edit Prices"), function() {
|
||||||
frappe.route_options = {
|
frappe.route_options = {
|
||||||
"price_list": cur_frm.doc.name
|
"price_list": frm.doc.name
|
||||||
};
|
};
|
||||||
frappe.set_route("Report", "Item Price");
|
frappe.set_route("Report", "Item Price");
|
||||||
}, "fa fa-money");
|
}, "fa fa-money");
|
||||||
}
|
}
|
||||||
});
|
});
|
Loading…
x
Reference in New Issue
Block a user