From de153aeb1d29794e1ee9a36e9838aeae8bc99f4f Mon Sep 17 00:00:00 2001 From: diptanilsaha Date: Mon, 4 Aug 2025 18:06:36 +0530 Subject: [PATCH] fix: set default_currency in accounts during child company creation --- .../doctype/account/chart_of_accounts/chart_of_accounts.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/erpnext/accounts/doctype/account/chart_of_accounts/chart_of_accounts.py b/erpnext/accounts/doctype/account/chart_of_accounts/chart_of_accounts.py index efb93874226..3513464fa77 100644 --- a/erpnext/accounts/doctype/account/chart_of_accounts/chart_of_accounts.py +++ b/erpnext/accounts/doctype/account/chart_of_accounts/chart_of_accounts.py @@ -18,6 +18,7 @@ def create_charts( accounts = [] def _import_accounts(children, parent, root_type, root_account=False): + nonlocal custom_chart for account_name, child in children.items(): if root_account: root_type = child.get("root_type") @@ -55,7 +56,8 @@ def create_charts( "account_number": account_number, "account_type": child.get("account_type"), "account_currency": child.get("account_currency") - or frappe.get_cached_value("Company", company, "default_currency"), + if custom_chart + else frappe.get_cached_value("Company", company, "default_currency"), "tax_rate": child.get("tax_rate"), } )