mirror of
https://github.com/frappe/erpnext.git
synced 2026-06-05 13:24:47 +00:00
install company fixtures while creating company (#10904)
* install company fixtures while creating company * [fix] remove from setup_complete
This commit is contained in:
committed by
Nabin Hait
parent
9aff73d156
commit
946e182564
@@ -27,7 +27,6 @@ doctype_js = {
|
|||||||
# setup wizard
|
# setup wizard
|
||||||
setup_wizard_requires = "assets/erpnext/js/setup_wizard.js"
|
setup_wizard_requires = "assets/erpnext/js/setup_wizard.js"
|
||||||
setup_wizard_complete = "erpnext.setup.setup_wizard.setup_wizard.setup_complete"
|
setup_wizard_complete = "erpnext.setup.setup_wizard.setup_wizard.setup_complete"
|
||||||
setup_wizard_success = "erpnext.setup.setup_wizard.setup_wizard.setup_success"
|
|
||||||
setup_wizard_test = "erpnext.setup.setup_wizard.test_setup_wizard.run_setup_wizard_test"
|
setup_wizard_test = "erpnext.setup.setup_wizard.test_setup_wizard.run_setup_wizard_test"
|
||||||
|
|
||||||
before_install = "erpnext.setup.install.check_setup_wizard_not_completed"
|
before_install = "erpnext.setup.install.check_setup_wizard_not_completed"
|
||||||
|
|||||||
@@ -75,11 +75,7 @@ class Company(Document):
|
|||||||
if not frappe.local.flags.ignore_chart_of_accounts:
|
if not frappe.local.flags.ignore_chart_of_accounts:
|
||||||
self.create_default_accounts()
|
self.create_default_accounts()
|
||||||
self.create_default_warehouses()
|
self.create_default_warehouses()
|
||||||
|
install_country_fixtures(self.name)
|
||||||
if cint(frappe.db.get_single_value('System Settings', 'setup_complete')):
|
|
||||||
# In the case of setup, fixtures should be installed after setup_success
|
|
||||||
# This also prevents db commits before setup is successful
|
|
||||||
install_country_fixtures(self.name)
|
|
||||||
|
|
||||||
if not frappe.db.get_value("Cost Center", {"is_group": 0, "company": self.name}):
|
if not frappe.db.get_value("Cost Center", {"is_group": 0, "company": self.name}):
|
||||||
self.create_default_cost_center()
|
self.create_default_cost_center()
|
||||||
|
|||||||
@@ -66,10 +66,6 @@ def setup_complete(args=None):
|
|||||||
|
|
||||||
pass
|
pass
|
||||||
|
|
||||||
def setup_success(args=None):
|
|
||||||
company = frappe.db.sql("select name from tabCompany", as_dict=True)[0]["name"]
|
|
||||||
install_country_fixtures(company)
|
|
||||||
|
|
||||||
def create_fiscal_year_and_company(args):
|
def create_fiscal_year_and_company(args):
|
||||||
if (args.get('fy_start_date')):
|
if (args.get('fy_start_date')):
|
||||||
curr_fiscal_year = get_fy_details(args.get('fy_start_date'), args.get('fy_end_date'))
|
curr_fiscal_year = get_fy_details(args.get('fy_start_date'), args.get('fy_end_date'))
|
||||||
|
|||||||
Reference in New Issue
Block a user