From e8bbdd5e84cf0134cc551f36bd909e12683c6b21 Mon Sep 17 00:00:00 2001 From: Rucha Mahabal Date: Fri, 6 Mar 2020 13:18:56 +0530 Subject: [PATCH] fix: Lab Test Template data import failing in Lab Test Item creation --- .../doctype/lab_test_template/lab_test_template.py | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) 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 fd7ae801d9..6bbb4f1c3a 100644 --- a/erpnext/healthcare/doctype/lab_test_template/lab_test_template.py +++ b/erpnext/healthcare/doctype/lab_test_template/lab_test_template.py @@ -99,13 +99,10 @@ def create_item_from_template(doc): # get item price list to insert item price if doc.lab_test_rate != 0.0: price_list_name = frappe.db.get_value("Price List", {"selling": 1}) - if(doc.lab_test_rate): + if doc.lab_test_rate: make_item_price(item.name, price_list_name, doc.lab_test_rate) - item.standard_rate = doc.lab_test_rate else: make_item_price(item.name, price_list_name, 0.0) - item.standard_rate = 0.0 - item.save(ignore_permissions = True) # Set item in the template frappe.db.set_value("Lab Test Template", doc.name, "item", item.name)