From f66e6aacd42182684a4a2e0311f8a88a38f0be32 Mon Sep 17 00:00:00 2001 From: Anand Doshi Date: Thu, 24 Sep 2015 14:59:06 +0530 Subject: [PATCH] [fix] [patch] convert_applicable_territory --- erpnext/patches/v6_3/convert_applicable_territory.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/erpnext/patches/v6_3/convert_applicable_territory.py b/erpnext/patches/v6_3/convert_applicable_territory.py index 483bf8a595..9ab84ba7f6 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: