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 027bbcb4b208..ed70ebb5f700 100644 --- a/erpnext/setup/doctype/transaction_deletion_record/transaction_deletion_record.js +++ b/erpnext/setup/doctype/transaction_deletion_record/transaction_deletion_record.js @@ -15,9 +15,6 @@ frappe.ui.form.on("Transaction Deletion Record", { }); } - - frm.get_field('doctypes_to_be_ignored').grid.cannot_add_rows = true; - }, refresh: function(frm) { @@ -25,6 +22,7 @@ frappe.ui.form.on("Transaction Deletion Record", { let execute_btn = __("Start Deletion") frm.add_custom_button(execute_btn, () => { + // Entry point for chain of events frm.call({ method: 'delete_bins', doc: frm.doc diff --git a/erpnext/setup/doctype/transaction_deletion_record/transaction_deletion_record.json b/erpnext/setup/doctype/transaction_deletion_record/transaction_deletion_record.json index bbc571a0816a..bd45b1c109df 100644 --- a/erpnext/setup/doctype/transaction_deletion_record/transaction_deletion_record.json +++ b/erpnext/setup/doctype/transaction_deletion_record/transaction_deletion_record.json @@ -41,7 +41,8 @@ "fieldname": "doctypes_to_be_ignored", "fieldtype": "Table", "label": "Excluded DocTypes", - "options": "Transaction Deletion Record Item" + "options": "Transaction Deletion Record Item", + "read_only": 1 }, { "fieldname": "amended_from", @@ -123,7 +124,7 @@ "index_web_pages_for_search": 1, "is_submittable": 1, "links": [], - "modified": "2024-02-04 10:55:09.430373", + "modified": "2024-02-04 15:28:29.532826", "modified_by": "Administrator", "module": "Setup", "name": "Transaction Deletion Record", diff --git a/erpnext/setup/doctype/transaction_deletion_record/transaction_deletion_record.py b/erpnext/setup/doctype/transaction_deletion_record/transaction_deletion_record.py index 60976aa572b8..0d553ca19e16 100644 --- a/erpnext/setup/doctype/transaction_deletion_record/transaction_deletion_record.py +++ b/erpnext/setup/doctype/transaction_deletion_record/transaction_deletion_record.py @@ -110,6 +110,7 @@ def populate_doctypes_to_be_ignored_table(self): @frappe.whitelist() def delete_bins(self): + # This methid is the entry point for the chain of events that follow if not self.delete_bin_data: frappe.db.sql( """delete from `tabBin` where warehouse in