Merge pull request #18532 from rohitwaghchaure/scrap_item_not_adding_v11_hotfix

fix: scrap item not adding while making finished good entry
This commit is contained in:
rohitwaghchaure
2019-07-31 12:09:52 +05:30
committed by GitHub

View File

@@ -753,13 +753,13 @@ class StockEntry(StockController):
self.add_to_stock_entry_detail(item_dict)
if self.purpose != "Subcontract":
scrap_item_dict = self.get_bom_scrap_material(self.fg_completed_qty)
for item in itervalues(scrap_item_dict):
if self.pro_doc and self.pro_doc.scrap_warehouse:
item["to_warehouse"] = self.pro_doc.scrap_warehouse
if self.purpose != "Subcontract" and self.purpose == "Manufacture":
scrap_item_dict = self.get_bom_scrap_material(self.fg_completed_qty)
for item in itervalues(scrap_item_dict):
if self.pro_doc and self.pro_doc.scrap_warehouse:
item["to_warehouse"] = self.pro_doc.scrap_warehouse
self.add_to_stock_entry_detail(scrap_item_dict, bom_no=self.bom_no)
self.add_to_stock_entry_detail(scrap_item_dict, bom_no=self.bom_no)
# fetch the serial_no of the first stock entry for the second stock entry
if self.work_order and self.purpose == "Manufacture":