[fix] if bom specified on purchase order item then don't pull default bom in purchase receipt (#10793)

* [fix] if bom specified on purchase order item then don't pull default bom in purchase receipt

* Update bom.js

* Update stock_entry.py
This commit is contained in:
Saurabh
2017-09-18 15:49:19 +05:30
committed by Nabin Hait
parent d7e1869a70
commit 590d401e5f
4 changed files with 5 additions and 3 deletions

View File

@@ -631,7 +631,8 @@ class StockEntry(StockController):
fetch_exploded = self.use_multi_level_bom)
for item in item_dict.values():
item.from_warehouse = self.from_warehouse or item.default_warehouse
# if source warehouse presents in BOM set from_warehouse as bom source_warehouse
item.from_warehouse = self.from_warehouse or item.source_warehouse or item.default_warehouse
return item_dict
def get_bom_scrap_material(self, qty):

View File

@@ -90,7 +90,7 @@ def get_item_details(args):
item.lead_time_days)
if args.get("is_subcontracted") == "Yes":
out.bom = get_default_bom(args.item_code)
out.bom = args.get('bom') or get_default_bom(args.item_code)
get_gross_profit(out)