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