[Fix] Raw materials are not showing in the stock entry if skip transfer is enabled and backflush is based on stock entry (#15187)

This commit is contained in:
rohitwaghchaure 2018-08-24 11:28:34 +05:30 committed by Nabin Hait
parent c5cf428d00
commit 2b72d09948

View File

@ -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 \