From e35841a2eab9b62c0ed44b54f2bee2e54ec013df Mon Sep 17 00:00:00 2001 From: Anand Doshi Date: Mon, 16 Jun 2014 12:59:54 +0530 Subject: [PATCH] Reload Shopping Cart Settings in create price list patch --- erpnext/patches/v4_0/create_price_list_if_missing.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/erpnext/patches/v4_0/create_price_list_if_missing.py b/erpnext/patches/v4_0/create_price_list_if_missing.py index eea1fd9ff6a..f65b7cb571a 100644 --- a/erpnext/patches/v4_0/create_price_list_if_missing.py +++ b/erpnext/patches/v4_0/create_price_list_if_missing.py @@ -11,6 +11,9 @@ def execute(): if not frappe.db.sql("""select name from tabCompany limit 1"""): return + if "shopping_cart" in frappe.get_installed_apps(): + frappe.reload_doc("shopping_cart", "doctype", "shopping_cart_settings") + if not frappe.db.sql("select name from `tabPrice List` where buying=1"): create_price_list(_("Standard Buying"), buying=1)