mirror of
https://github.com/frappe/erpnext.git
synced 2026-05-27 00:44:45 +00:00
Force delete item on deletion of Lab test template (#15079)
This commit is contained in:
@@ -34,7 +34,7 @@ class LabTestTemplate(Document):
|
|||||||
# remove template refernce from item and disable item
|
# remove template refernce from item and disable item
|
||||||
if(self.item):
|
if(self.item):
|
||||||
try:
|
try:
|
||||||
frappe.delete_doc("Item",self.item)
|
frappe.delete_doc("Item",self.item, force=True)
|
||||||
except Exception:
|
except Exception:
|
||||||
frappe.throw("""Not permitted. Please disable the Test Template""")
|
frappe.throw("""Not permitted. Please disable the Test Template""")
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user