diff --git a/frappe/desk/page/setup_wizard/install_fixtures.py b/frappe/desk/page/setup_wizard/install_fixtures.py index c857bd077f..6917ef0426 100644 --- a/frappe/desk/page/setup_wizard/install_fixtures.py +++ b/frappe/desk/page/setup_wizard/install_fixtures.py @@ -6,12 +6,14 @@ from __future__ import unicode_literals import frappe from frappe import _ from frappe.desk.doctype.global_search_settings.global_search_settings import update_global_search_doctypes +from frappe.utils.dashboard import sync_dashboards def install(): update_genders() update_salutations() update_global_search_doctypes() setup_email_linking() + sync_dashboards() @frappe.whitelist() def update_genders(): @@ -35,4 +37,3 @@ def setup_email_linking(): "email_id": "email_linking@example.com", }) doc.insert(ignore_permissions=True, ignore_if_duplicate=True) - \ No newline at end of file diff --git a/frappe/migrate.py b/frappe/migrate.py index 043b6817d7..094abbe099 100644 --- a/frappe/migrate.py +++ b/frappe/migrate.py @@ -10,6 +10,7 @@ import frappe.translate import frappe.modules.patch_handler import frappe.model.sync from frappe.utils.fixtures import sync_fixtures +from frappe.utils.dashboard import sync_dashboards from frappe.cache_manager import clear_global_cache from frappe.desk.notifications import clear_notifications from frappe.website import render @@ -23,6 +24,7 @@ def migrate(verbose=True, rebuild_website=False, skip_failing=False): - run before migrate hooks - run patches - sync doctypes (schema) + - sync dashboards - sync fixtures - sync desktop icons - sync web pages (from /www) @@ -53,6 +55,7 @@ def migrate(verbose=True, rebuild_website=False, skip_failing=False): frappe.translate.clear_cache() sync_jobs() sync_fixtures() + sync_dashboards() sync_customizations() sync_languages() diff --git a/frappe/model/sync.py b/frappe/model/sync.py index c2acb59f63..c753f64e89 100644 --- a/frappe/model/sync.py +++ b/frappe/model/sync.py @@ -45,6 +45,8 @@ def sync_for(app_name, force=0, sync_everything = False, verbose=False, reset_pe ("data_migration", "data_migration_mapping"), ("data_migration", "data_migration_plan_mapping"), ("data_migration", "data_migration_plan"), + ("desk", "dashboard_chart"), + ("desk", "dashboard"), ("desk", "onboarding_permission"), ("desk", "onboarding_step"), ("desk", "onboarding_step_map"),