From 2275cd15e66543a65c50b0c56c4e84181620c214 Mon Sep 17 00:00:00 2001 From: Nabin Hait Date: Tue, 9 Aug 2016 14:21:22 +0530 Subject: [PATCH] [patch] Reload Purchase Invoice in patch --- erpnext/patches/v7_0/repost_future_gle_for_purchase_invoice.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/erpnext/patches/v7_0/repost_future_gle_for_purchase_invoice.py b/erpnext/patches/v7_0/repost_future_gle_for_purchase_invoice.py index 3a6526ca23..ebc1e694f0 100644 --- a/erpnext/patches/v7_0/repost_future_gle_for_purchase_invoice.py +++ b/erpnext/patches/v7_0/repost_future_gle_for_purchase_invoice.py @@ -9,7 +9,8 @@ from erpnext.controllers.stock_controller import get_warehouse_account, update_g def execute(): if not cint(frappe.defaults.get_global_default("auto_accounting_for_stock")): return - + + frappe.reload_doctype("Purchase Invoice") wh_account = get_warehouse_account() for pi in frappe.get_all("Purchase Invoice", filters={"docstatus": 1, "update_stock": 1}):