From 994cef5ee3c7b479dc68398c0c02c00f6a66c9bb Mon Sep 17 00:00:00 2001 From: Rushabh Mehta Date: Thu, 13 Apr 2017 13:13:52 +0530 Subject: [PATCH] [minor] fix imports in old patches --- erpnext/patches/v4_0/import_country_codes.py | 2 +- erpnext/patches/v4_0/update_users_report_view_settings.py | 2 +- erpnext/patches/v4_2/add_currency_turkish_lira.py | 3 +-- erpnext/patches/v4_2/default_website_style.py | 2 +- 4 files changed, 4 insertions(+), 5 deletions(-) diff --git a/erpnext/patches/v4_0/import_country_codes.py b/erpnext/patches/v4_0/import_country_codes.py index 4fda96066fa..5e9f3b4b87a 100644 --- a/erpnext/patches/v4_0/import_country_codes.py +++ b/erpnext/patches/v4_0/import_country_codes.py @@ -4,7 +4,7 @@ from __future__ import unicode_literals import frappe from frappe.geo.country_info import get_all -from erpnext.setup.install import import_country_and_currency +from frappe.utils.install import import_country_and_currency def execute(): frappe.reload_doc("setup", "doctype", "country") diff --git a/erpnext/patches/v4_0/update_users_report_view_settings.py b/erpnext/patches/v4_0/update_users_report_view_settings.py index c0b38ef396a..6f216f5b38b 100644 --- a/erpnext/patches/v4_0/update_users_report_view_settings.py +++ b/erpnext/patches/v4_0/update_users_report_view_settings.py @@ -3,7 +3,7 @@ from __future__ import unicode_literals -from frappe.model import update_users_report_view_settings +from frappe.model.utils.rename_field import update_users_report_view_settings from erpnext.patches.v4_0.fields_to_be_renamed import rename_map def execute(): diff --git a/erpnext/patches/v4_2/add_currency_turkish_lira.py b/erpnext/patches/v4_2/add_currency_turkish_lira.py index 42dc82c3ac8..dac1fe908fa 100644 --- a/erpnext/patches/v4_2/add_currency_turkish_lira.py +++ b/erpnext/patches/v4_2/add_currency_turkish_lira.py @@ -3,9 +3,8 @@ from __future__ import unicode_literals import frappe -from frappe.geo.country_info import get_country_info -from erpnext.setup.install import add_country_and_currency def execute(): + return country = get_country_info(country="Turkey") add_country_and_currency("Turkey", country) diff --git a/erpnext/patches/v4_2/default_website_style.py b/erpnext/patches/v4_2/default_website_style.py index cdf0a7a9839..d168c868312 100644 --- a/erpnext/patches/v4_2/default_website_style.py +++ b/erpnext/patches/v4_2/default_website_style.py @@ -1,8 +1,8 @@ from __future__ import unicode_literals import frappe -from frappe.www.style_settings import default_properties def execute(): + return frappe.reload_doc('website', 'doctype', 'style_settings') style_settings = frappe.get_doc("Style Settings", "Style Settings") if not style_settings.apply_style: