diff --git a/erpnext/patches/v6_3/convert_applicable_territory.py b/erpnext/patches/v6_3/convert_applicable_territory.py index 3054ecc879..483bf8a595 100644 --- a/erpnext/patches/v6_3/convert_applicable_territory.py +++ b/erpnext/patches/v6_3/convert_applicable_territory.py @@ -5,6 +5,8 @@ def execute(): countries = frappe.db.sql_list("select name from tabCountry") for doctype in ("Price List", "Shipping Rule"): + frappe.reload_doctype(doctype) + for at in frappe.db.sql("""select name, parent, territory from `tabApplicable Territory` where parenttype = %s """, doctype, as_dict=True): if at.territory in countries: