chore: remove currency info from boot (#31520)

refactor: remove currency info from boot

Framework loads this info by default now, so no need to add it here.
This commit is contained in:
Ankush Menat 2022-07-05 11:22:32 +05:30 committed by GitHub
parent d5da8c7403
commit 90942d2ba5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -14,7 +14,6 @@ def boot_session(bootinfo):
if frappe.session["user"] != "Guest":
update_page_info(bootinfo)
load_country_and_currency(bootinfo)
bootinfo.sysdefaults.territory = frappe.db.get_single_value("Selling Settings", "territory")
bootinfo.sysdefaults.customer_group = frappe.db.get_single_value(
"Selling Settings", "customer_group"
@ -53,20 +52,6 @@ def boot_session(bootinfo):
bootinfo.party_account_types = frappe._dict(party_account_types)
def load_country_and_currency(bootinfo):
country = frappe.db.get_default("country")
if country and frappe.db.exists("Country", country):
bootinfo.docs += [frappe.get_doc("Country", country)]
bootinfo.docs += frappe.db.sql(
"""select name, fraction, fraction_units,
number_format, smallest_currency_fraction_value, symbol from tabCurrency
where enabled=1""",
as_dict=1,
update={"doctype": ":Currency"},
)
def update_page_info(bootinfo):
bootinfo.page_info.update(
{