set from_warehouse only if purchase_order and purpose found (#12398)

This commit is contained in:
Zarrar 2018-01-10 16:29:40 +05:30 committed by Nabin Hait
parent 687dc6a424
commit 94f9f48d70

View File

@ -599,7 +599,7 @@ class StockEntry(StockController):
if self.pro_doc and not self.pro_doc.skip_transfer: if self.pro_doc and not self.pro_doc.skip_transfer:
item["from_warehouse"] = self.pro_doc.wip_warehouse item["from_warehouse"] = self.pro_doc.wip_warehouse
#Get Reserve Warehouse from PO #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 "" item["to_warehouse"] = self.to_warehouse if self.purpose=="Subcontract" else ""
self.add_to_stock_entry_detail(item_dict) self.add_to_stock_entry_detail(item_dict)