From aed69f92f75a263b555279aab4d5cf4a8ee652a7 Mon Sep 17 00:00:00 2001 From: "Nihantra C. Patel" <141945075+Nihantra-Patel@users.noreply.github.com> Date: Tue, 18 Feb 2025 14:55:39 +0530 Subject: [PATCH] fix: hide create button for cancelled doc in dashboard links (#31295) --- frappe/public/js/frappe/form/form.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/frappe/public/js/frappe/form/form.js b/frappe/public/js/frappe/form/form.js index e420359655..9fef63f231 100644 --- a/frappe/public/js/frappe/form/form.js +++ b/frappe/public/js/frappe/form/form.js @@ -1954,7 +1954,7 @@ frappe.ui.form.Form = class FrappeForm { if (this.can_make_methods && this.can_make_methods[doctype]) { return this.can_make_methods[doctype](this); } else { - if (this.meta.is_submittable && !this.doc.docstatus == 1) { + if (this.meta.is_submittable && this.doc.docstatus !== 1) { return false; } else { return true;