Merge pull request #27772 from gavindsouza/delete_doc-check_if_submittable

fix(delete_doc): Check if submittable before docstatus validation
This commit is contained in:
Akhil Narang 2024-09-16 15:41:30 +05:30 committed by GitHub
commit fc8259a2a5
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -246,7 +246,7 @@ def check_permission_and_not_submitted(doc):
)
# check if submitted
if doc.docstatus.is_submitted():
if doc.meta.is_submittable and doc.docstatus.is_submitted():
frappe.msgprint(
_("{0} {1}: Submitted Record cannot be deleted. You must {2} Cancel {3} it first.").format(
_(doc.doctype),