diff --git a/erpnext/startup/boot.py b/erpnext/startup/boot.py index ceeceaa3c9..6b503b3eec 100644 --- a/erpnext/startup/boot.py +++ b/erpnext/startup/boot.py @@ -16,8 +16,10 @@ def boot_session(bootinfo): update_page_info(bootinfo) load_country_and_currency(bootinfo) - bootinfo.sysdefaults.territory = get_root_of('Territory') - bootinfo.sysdefaults.customer_group = get_root_of('Customer Group') + bootinfo.sysdefaults.territory = frappe.db.get_single_value('Selling Settings', + 'territory') or get_root_of('Territory') + bootinfo.sysdefaults.customer_group = frappe.db.get_single_value('Selling Settings', + 'customer_group') or get_root_of('Customer Group') bootinfo.notification_settings = frappe.get_doc("Notification Control", "Notification Control")