diff --git a/erpnext/patches/v6_3/convert_applicable_territory.py b/erpnext/patches/v6_3/convert_applicable_territory.py index 483bf8a5957..9ab84ba7f60 100644 --- a/erpnext/patches/v6_3/convert_applicable_territory.py +++ b/erpnext/patches/v6_3/convert_applicable_territory.py @@ -1,12 +1,14 @@ import frappe def execute(): + frappe.reload_doctype("Price List Country") + frappe.reload_doctype("Price List") + frappe.reload_doctype("Shipping Rule") + # for price list 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: