diff --git a/erpnext/setup/doctype/transaction_deletion_record/transaction_deletion_record.js b/erpnext/setup/doctype/transaction_deletion_record/transaction_deletion_record.js index c6bb3781bfcf..027bbcb4b208 100644 --- a/erpnext/setup/doctype/transaction_deletion_record/transaction_deletion_record.js +++ b/erpnext/setup/doctype/transaction_deletion_record/transaction_deletion_record.js @@ -10,40 +10,19 @@ frappe.ui.form.on("Transaction Deletion Record", { callback: function (r) { doctypes_to_be_ignored_array = r.message; populate_doctypes_to_be_ignored(doctypes_to_be_ignored_array, frm); - frm.fields_dict["doctypes_to_be_ignored"].grid.set_column_disp("no_of_docs", false); - frm.refresh_field("doctypes_to_be_ignored"); - }, + frm.refresh_field('doctypes_to_be_ignored'); + } }); } frm.get_field('doctypes_to_be_ignored').grid.cannot_add_rows = true; - frm.fields_dict['doctypes_to_be_ignored'].grid.set_column_disp('no_of_docs', false); - frm.fields_dict['doctypes_to_be_ignored'].grid.set_column_disp('done', false); - frm.refresh_field('doctypes_to_be_ignored'); - frm.get_field('doctypes').grid.cannot_add_rows = true; - frm.fields_dict['doctypes'].grid.set_column_disp('no_of_docs', true); - frm.refresh_field('doctypes'); }, - refresh: function (frm) { - frm.fields_dict["doctypes_to_be_ignored"].grid.set_column_disp("no_of_docs", false); - frm.refresh_field("doctypes_to_be_ignored"); - - if (frm.doc.docstatus==1 && ['Queued', 'Failed'].find(x => x == frm.doc.status)) { - let execute_btn = __("Start / Resume") - - frm.add_custom_button(execute_btn, () => { - frm.call({ - method: 'start_deletion_process', - doc: frm.doc - }); - }); - } - + refresh: function(frm) { if (frm.doc.docstatus==1 && ['Queued', 'Failed'].find(x => x == frm.doc.status)) { - let execute_btn = __("Start Chain of Events") + let execute_btn = __("Start Deletion") frm.add_custom_button(execute_btn, () => { frm.call({