From 53712ed556c8fbf010a9bfb9e23ceeebbb3f1975 Mon Sep 17 00:00:00 2001 From: Gursheen Anand Date: Tue, 10 Oct 2023 13:02:05 +0530 Subject: [PATCH] fix: only show amended docs in dropdown --- frappe/core/doctype/audit_trail/audit_trail.js | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/frappe/core/doctype/audit_trail/audit_trail.js b/frappe/core/doctype/audit_trail/audit_trail.js index ffd289257e..6db096085d 100644 --- a/frappe/core/doctype/audit_trail/audit_trail.js +++ b/frappe/core/doctype/audit_trail/audit_trail.js @@ -16,6 +16,14 @@ frappe.ui.form.on("Audit Trail", { }; }); + frm.set_query("document", () => { + return { + filters: { + amended_from: ["!=", ""], + }, + }; + }); + frm.page.set_primary_action("Compare", () => { frm.call({ doc: frm.doc,