From 2e203e53c6a4740ff125cfc13679d56914c2b043 Mon Sep 17 00:00:00 2001 From: Nabin Hait Date: Wed, 28 Mar 2018 10:38:55 +0530 Subject: [PATCH] Update fix_reserved_qty_for_sub_contract.py --- erpnext/patches/v10_0/fix_reserved_qty_for_sub_contract.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/erpnext/patches/v10_0/fix_reserved_qty_for_sub_contract.py b/erpnext/patches/v10_0/fix_reserved_qty_for_sub_contract.py index 8a456382ab..5d025374ed 100644 --- a/erpnext/patches/v10_0/fix_reserved_qty_for_sub_contract.py +++ b/erpnext/patches/v10_0/fix_reserved_qty_for_sub_contract.py @@ -6,6 +6,7 @@ import frappe from erpnext.stock.utils import get_bin def execute(): + frappe.reload_doc("buying", "doctype", "purchase_order_item_supplied") for d in frappe.db.sql(""" select distinct rm_item_code, reserve_warehouse from `tabPurchase Order Item Supplied` @@ -26,4 +27,4 @@ def execute(): bin_doc = get_bin(d[0], d[1]) bin_doc.update_reserved_qty_for_production() except: - pass \ No newline at end of file + pass