From 94f9f48d70420d5cea6d8e66b950da2efb0e3e05 Mon Sep 17 00:00:00 2001 From: Zarrar Date: Wed, 10 Jan 2018 16:29:40 +0530 Subject: [PATCH] set from_warehouse only if purchase_order and purpose found (#12398) --- erpnext/stock/doctype/stock_entry/stock_entry.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/erpnext/stock/doctype/stock_entry/stock_entry.py b/erpnext/stock/doctype/stock_entry/stock_entry.py index 3af8d4e715..dd8d99889c 100644 --- a/erpnext/stock/doctype/stock_entry/stock_entry.py +++ b/erpnext/stock/doctype/stock_entry/stock_entry.py @@ -599,7 +599,7 @@ class StockEntry(StockController): if self.pro_doc and not self.pro_doc.skip_transfer: item["from_warehouse"] = self.pro_doc.wip_warehouse #Get Reserve Warehouse from PO - item["from_warehouse"] = item_wh.get(item.item_code) + item["from_warehouse"] = item_wh.get(item.item_code) if self.purchase_order and self.purpose=="Subcontract" else "" item["to_warehouse"] = self.to_warehouse if self.purpose=="Subcontract" else "" self.add_to_stock_entry_detail(item_dict)