From 1fb0d1460a443bcfafe94514cc2ad5e3b79ea8b9 Mon Sep 17 00:00:00 2001 From: Rohit Waghchaure Date: Tue, 19 Aug 2025 15:45:35 +0530 Subject: [PATCH] fix: company issue in setup wizard --- .../setup_wizard/operations/install_fixtures.py | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/erpnext/setup/setup_wizard/operations/install_fixtures.py b/erpnext/setup/setup_wizard/operations/install_fixtures.py index ee37399e583..64108562266 100644 --- a/erpnext/setup/setup_wizard/operations/install_fixtures.py +++ b/erpnext/setup/setup_wizard/operations/install_fixtures.py @@ -481,14 +481,19 @@ def install_defaults(args=None): # nosemgrep create_bank_account(args) -def set_global_defaults(args): +def set_global_defaults(kwargs): global_defaults = frappe.get_doc("Global Defaults", "Global Defaults") + company = frappe.db.get_value( + "Company", + {"company_name": kwargs.get("company_name")}, + "name", + ) global_defaults.update( { - "default_currency": args.get("currency"), - "default_company": args.get("company_name"), - "country": args.get("country"), + "default_currency": kwargs.get("currency"), + "default_company": company, + "country": kwargs.get("country"), } )