From 3dfc9303cafd8f7b73b58dfdc0e248a0a5b9a432 Mon Sep 17 00:00:00 2001 From: Nabin Hait Date: Thu, 8 Aug 2013 11:29:08 +0530 Subject: [PATCH] [minor] [fix] validation in stock reconciliation --- stock/doctype/stock_reconciliation/stock_reconciliation.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/stock/doctype/stock_reconciliation/stock_reconciliation.py b/stock/doctype/stock_reconciliation/stock_reconciliation.py index dbe2d2a4c5..617ec698c4 100644 --- a/stock/doctype/stock_reconciliation/stock_reconciliation.py +++ b/stock/doctype/stock_reconciliation/stock_reconciliation.py @@ -286,6 +286,9 @@ class DocType(StockController): item_list = [d.item_code for d in self.entries] warehouse_list = [d.warehouse for d in self.entries] + if not (item_list and warehouse_list): + webnotes.throw(_("Invalid Item or Warehouse Data")) + stock_ledger_entries = self.get_stock_ledger_entries(item_list, warehouse_list) self.doc.stock_value_difference = 0.0