From 0aeeb7e02c06714ba136c43d64391da1a740cd52 Mon Sep 17 00:00:00 2001 From: rohitwaghchaure Date: Mon, 12 Feb 2018 11:44:39 +0530 Subject: [PATCH] [Fix] Item variant details report (#12869) --- .../stock/report/item_variant_details/item_variant_details.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/erpnext/stock/report/item_variant_details/item_variant_details.py b/erpnext/stock/report/item_variant_details/item_variant_details.py index 67b6b5f2a0..f1488f8eff 100644 --- a/erpnext/stock/report/item_variant_details/item_variant_details.py +++ b/erpnext/stock/report/item_variant_details/item_variant_details.py @@ -17,7 +17,7 @@ def get_data(item): variant_results = frappe.db.sql("""select name from `tabItem` where variant_of = %s""", item, as_dict=1) - variants = ",".join(['"' + variant['name'] + '"' for variant in variant_results]) + variants = ",".join(['"' + frappe.db.escape(variant['name']) + '"' for variant in variant_results]) order_count_map = get_open_sales_orders_map(variants) stock_details_map = get_stock_details_map(variants)