From c020e42d20ed4e9ee1e7c01d726d589c59e47562 Mon Sep 17 00:00:00 2001 From: Anand Doshi Date: Thu, 24 Sep 2015 13:08:35 +0530 Subject: [PATCH] [fix] [patch] convert applicable territory --- erpnext/patches/v6_3/convert_applicable_territory.py | 2 ++ 1 file changed, 2 insertions(+) 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: