Update update_reserved_qty_for_purchase_order.py

This commit is contained in:
Nabin Hait
2018-03-13 17:10:14 +05:30
committed by GitHub
parent d98a6d81eb
commit 74c817e7f9

View File

@@ -37,8 +37,11 @@ def execute():
and po.is_subcontracted = "Yes"
and po.docstatus = 1"""), as_dict=1)
for d in item_wh_bin:
stock_bin = get_bin(d["rm_item_code"], d["reserve_warehouse"])
stock_bin.update_reserved_qty_for_sub_contracting()
try:
stock_bin = get_bin(d["rm_item_code"], d["reserve_warehouse"])
stock_bin.update_reserved_qty_for_sub_contracting()
except:
pass
def get_warehouse(item_code, company, company_warehouse, item_wh):
reserve_warehouse = item_wh.get(item_code)
@@ -46,4 +49,4 @@ def get_warehouse(item_code, company, company_warehouse, item_wh):
reserve_warehouse = None
if not reserve_warehouse:
reserve_warehouse = company_warehouse.get(company)
return reserve_warehouse
return reserve_warehouse