From cea4b50bbc29f0b5e42d4e0bd1fcb4e3529ab4d6 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 (cherry picked from commit 1fb0d1460a443bcfafe94514cc2ad5e3b79ea8b9) --- .../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 9cdf24cf451..c78e9b5b60d 100644 --- a/erpnext/setup/setup_wizard/operations/install_fixtures.py +++ b/erpnext/setup/setup_wizard/operations/install_fixtures.py @@ -480,14 +480,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"), } )