Update __init__.py
This commit is contained in:
parent
9adfd2d7b4
commit
a334ed879f
@ -7,5 +7,5 @@ from erpnext import get_region
|
|||||||
|
|
||||||
def check_deletion_permission(doc, method):
|
def check_deletion_permission(doc, method):
|
||||||
region = get_region()
|
region = get_region()
|
||||||
if region in ["Nepal", "France"]:
|
if region in ["Nepal", "France"] and doc.docstatus != 0:
|
||||||
frappe.throw(_("Deletion is not permitted for country {0}".format(region)))
|
frappe.throw(_("Deletion is not permitted for country {0}".format(region)))
|
Loading…
Reference in New Issue
Block a user