From 5cbe3441e8ca4020dd8006670b348d484b47e45f Mon Sep 17 00:00:00 2001 From: Nabin Hait Date: Thu, 9 Jul 2015 18:42:15 +0530 Subject: [PATCH] Reload doctype in patch --- erpnext/patches/v5_1/fix_credit_days_based_on.py | 1 + 1 file changed, 1 insertion(+) diff --git a/erpnext/patches/v5_1/fix_credit_days_based_on.py b/erpnext/patches/v5_1/fix_credit_days_based_on.py index 92778180f3..f9c91f8ebc 100644 --- a/erpnext/patches/v5_1/fix_credit_days_based_on.py +++ b/erpnext/patches/v5_1/fix_credit_days_based_on.py @@ -4,5 +4,6 @@ import frappe def execute(): for dt in ("Customer", "Customer Group", "Company"): + frappe.reload_doctype(dt) frappe.db.sql("""update `tab{0}` set credit_days_based_on='Fixed Days' where ifnull(credit_days, 0) > 0""".format(dt)) \ No newline at end of file