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:
commit
fc8259a2a5
1 changed files with 1 additions and 1 deletions
|
|
@ -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),
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue