mirror of
https://github.com/frappe/erpnext.git
synced 2026-02-15 23:54:59 +00:00
refactor: minor UI tweaks
This commit is contained in:
@@ -10,26 +10,24 @@ 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.refresh_field('doctypes_to_be_ignored');
|
||||
}
|
||||
frm.refresh_field("doctypes_to_be_ignored");
|
||||
},
|
||||
});
|
||||
}
|
||||
|
||||
},
|
||||
|
||||
refresh: function(frm) {
|
||||
if (frm.doc.docstatus==1 && ['Queued', 'Failed'].find(x => x == frm.doc.status)) {
|
||||
let execute_btn = __("Start Deletion")
|
||||
refresh: function (frm) {
|
||||
if (frm.doc.docstatus == 1 && ["Queued", "Failed"].find((x) => x == frm.doc.status)) {
|
||||
let execute_btn = frm.doc.status == "Queued" ? __("Start Deletion") : __("Retry");
|
||||
|
||||
frm.add_custom_button(execute_btn, () => {
|
||||
// Entry point for chain of events
|
||||
frm.call({
|
||||
method: 'process_tasks',
|
||||
doc: frm.doc
|
||||
method: "process_tasks",
|
||||
doc: frm.doc,
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
},
|
||||
});
|
||||
|
||||
|
||||
@@ -329,6 +329,7 @@ class TransactionDeletionRecord(Document):
|
||||
else:
|
||||
self.db_set("status", "Completed")
|
||||
self.db_set("delete_transactions", 1)
|
||||
self.db_set("error_log", None)
|
||||
|
||||
def get_doctypes_to_be_ignored_list(self):
|
||||
singles = frappe.get_all("DocType", filters={"issingle": 1}, pluck="name")
|
||||
|
||||
Reference in New Issue
Block a user