From 11dd3ffdb539253e721929d3a1e58e55cde3c766 Mon Sep 17 00:00:00 2001 From: Shreya Shah Date: Mon, 6 Aug 2018 14:43:00 +0530 Subject: [PATCH] Force delete item on deletion of Lab test template (#15079) --- .../healthcare/doctype/lab_test_template/lab_test_template.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/erpnext/healthcare/doctype/lab_test_template/lab_test_template.py b/erpnext/healthcare/doctype/lab_test_template/lab_test_template.py index bb0ead62cf..35eb7f56b8 100644 --- a/erpnext/healthcare/doctype/lab_test_template/lab_test_template.py +++ b/erpnext/healthcare/doctype/lab_test_template/lab_test_template.py @@ -34,7 +34,7 @@ class LabTestTemplate(Document): # remove template refernce from item and disable item if(self.item): try: - frappe.delete_doc("Item",self.item) + frappe.delete_doc("Item",self.item, force=True) except Exception: frappe.throw("""Not permitted. Please disable the Test Template""")