From 314086d6c05cd159aa94a84878bf160a8b7162bb Mon Sep 17 00:00:00 2001 From: Nabin Hait Date: Wed, 7 Oct 2015 11:55:01 +0530 Subject: [PATCH] [fix] Fetch UOM Conversion Factor from template if not specified in variants --- erpnext/stock/get_item_details.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/erpnext/stock/get_item_details.py b/erpnext/stock/get_item_details.py index a626875cdf..fb661e13a8 100644 --- a/erpnext/stock/get_item_details.py +++ b/erpnext/stock/get_item_details.py @@ -346,8 +346,7 @@ def get_conversion_factor(item_code, uom): variant_of = frappe.db.get_value("Item", item_code, "variant_of") filters = {"parent": item_code, "uom": uom} if variant_of: - filters = {"parent": ("in", (item_code, variant_of))} - + filters["parent"] = ("in", (item_code, variant_of)) return {"conversion_factor": frappe.db.get_value("UOM Conversion Detail", filters, "conversion_factor")}