From 2b72d099482992f2a23eb30dd47204388c608549 Mon Sep 17 00:00:00 2001 From: rohitwaghchaure Date: Fri, 24 Aug 2018 11:28:34 +0530 Subject: [PATCH] [Fix] Raw materials are not showing in the stock entry if skip transfer is enabled and backflush is based on stock entry (#15187) --- erpnext/stock/doctype/stock_entry/stock_entry.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/erpnext/stock/doctype/stock_entry/stock_entry.py b/erpnext/stock/doctype/stock_entry/stock_entry.py index 2dd9e57c50..e3dfff7d60 100644 --- a/erpnext/stock/doctype/stock_entry/stock_entry.py +++ b/erpnext/stock/doctype/stock_entry/stock_entry.py @@ -666,8 +666,9 @@ class StockEntry(StockController): item["to_warehouse"] = self.pro_doc.wip_warehouse self.add_to_stock_entry_detail(item_dict) - elif self.work_order and (self.purpose == "Manufacture" or self.purpose == "Material Consumption for Manufacture") and \ - frappe.db.get_single_value("Manufacturing Settings", "backflush_raw_materials_based_on")== "Material Transferred for Manufacture": + elif (self.work_order and (self.purpose == "Manufacture" or self.purpose == "Material Consumption for Manufacture") + and not self.pro_doc.skip_transfer and frappe.db.get_single_value("Manufacturing Settings", + "backflush_raw_materials_based_on")== "Material Transferred for Manufacture"): self.get_transfered_raw_materials() elif self.work_order and (self.purpose == "Manufacture" or self.purpose == "Material Consumption for Manufacture") and \