From 5f2afb880323a0b13f041653b253e48f0b4512b7 Mon Sep 17 00:00:00 2001 From: Deepesh Garg <42651287+deepeshgarg007@users.noreply.github.com> Date: Mon, 27 May 2019 13:42:29 +0530 Subject: [PATCH] fix: Do not fetch batch items and serialized items in stock reconciliation (#17725) --- .../stock/doctype/stock_reconciliation/stock_reconciliation.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/erpnext/stock/doctype/stock_reconciliation/stock_reconciliation.py b/erpnext/stock/doctype/stock_reconciliation/stock_reconciliation.py index a00d279f97..1fd617c034 100644 --- a/erpnext/stock/doctype/stock_reconciliation/stock_reconciliation.py +++ b/erpnext/stock/doctype/stock_reconciliation/stock_reconciliation.py @@ -276,7 +276,8 @@ def get_items(warehouse, posting_date, posting_time, company): items = frappe.db.sql(""" select i.name, i.item_name, bin.warehouse from tabBin bin, tabItem i - where i.name=bin.item_code and i.disabled=0 + where i.name=bin.item_code and i.disabled=0 and i.is_stock_item = 1 + and i.has_variants = 0 and i.has_serial_no = 0 and i.has_batch_no = 0 and exists(select name from `tabWarehouse` where lft >= %s and rgt <= %s and name=bin.warehouse) """, (lft, rgt))