fix: hide create button for cancelled doc in dashboard links (#31295)

This commit is contained in:
Nihantra C. Patel 2025-02-18 14:55:39 +05:30 committed by GitHub
parent ef4ffbb304
commit aed69f92f7
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -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;