refactor: more buttons

This commit is contained in:
ruthra kumar
2023-09-25 12:16:27 +05:30
parent 2de3e6ce6d
commit a427029151

View File

@@ -3,10 +3,21 @@
frappe.ui.form.on("Bisect Accounting Statements", { frappe.ui.form.on("Bisect Accounting Statements", {
refresh(frm) { refresh(frm) {
frm.add_custom_button(__('Bisect Left'), () =>
frm.trigger("bisect_left")
);
frm.add_custom_button(__('Bisect Right'), () =>
frm.trigger("bisect_right")
);
frm.add_custom_button(__('Up'), () =>
frm.trigger("move_up")
);
frm.add_custom_button(__('Bisect'), () => frm.add_custom_button(__('Bisect'), () =>
frm.trigger("bisect") frm.trigger("bisect")
); );
frm.change_custom_button_type(__('Bisect'), null, 'primary'); // frm.change_custom_button_type(__('Bisect'), null, 'primary');
}, },
bisect(frm) { bisect(frm) {
frm.call({ frm.call({