diff --git a/erpnext/setup/setup_wizard/operations/install_fixtures.py b/erpnext/setup/setup_wizard/operations/install_fixtures.py index 7123021d1ef..6dbb89062ea 100644 --- a/erpnext/setup/setup_wizard/operations/install_fixtures.py +++ b/erpnext/setup/setup_wizard/operations/install_fixtures.py @@ -502,8 +502,17 @@ def install_defaults(args=None): def add_dashboards(): from erpnext.setup.setup_wizard.data.dashboard_charts import get_default_dashboards + from frappe.modules.import_file import import_file_by_path + dashboard_data = get_default_dashboards() + # create account balance timeline before creating dashbaord charts + doctype = "dashboard_chart_source" + docname = "account_balance_timeline" + folder = os.path.dirname(frappe.get_module("erpnext.accounts").__file__) + doc_path = os.path.join(folder, doctype, docname, docname) + ".json" + import_file_by_path(doc_path, force=0, for_sync=True) + make_records(dashboard_data["Charts"]) make_records(dashboard_data["Dashboards"])