feat: sync dashboards after setup and migrate

This commit is contained in:
Shivam Mishra 2020-05-06 14:45:07 +05:30
parent 52eee67217
commit db152b28de
3 changed files with 7 additions and 1 deletions

View file

@ -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)

View file

@ -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()

View file

@ -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"),