From 2f45fad47d5742234e60d4b90f846860d716fb6f Mon Sep 17 00:00:00 2001 From: "mergify[bot]" <37929162+mergify[bot]@users.noreply.github.com> Date: Thu, 28 May 2020 14:43:38 +0530 Subject: [PATCH] CRM dashboard fixes (#21989) (#22003) (cherry picked from commit f10771029a88f987795eb46e5081cb109b1a8d6f) Co-authored-by: Anupam Kumar --- erpnext/crm/dashboard_fixtures.py | 24 ++++++++++++++++++------ erpnext/crm/desk_page/crm/crm.json | 4 ++-- 2 files changed, 20 insertions(+), 8 deletions(-) diff --git a/erpnext/crm/dashboard_fixtures.py b/erpnext/crm/dashboard_fixtures.py index 16904b3429..0535cbbcc9 100644 --- a/erpnext/crm/dashboard_fixtures.py +++ b/erpnext/crm/dashboard_fixtures.py @@ -21,8 +21,8 @@ def get_dashboards(): { "chart": "Opportunity Trends", "width": "Full"}, { "chart": "Won Opportunities", "width": "Full" }, { "chart": "Territory Wise Opportunity Count", "width": "Half"}, - { "chart": "Territory Wise Sales", "width": "Half"}, { "chart": "Opportunities via Campaigns", "width": "Half" }, + { "chart": "Territory Wise Sales", "width": "Full"}, { "chart": "Lead Source", "width": "Half"} ], "cards": [ @@ -59,7 +59,7 @@ def get_charts(): 'is_public': 1, 'timeseries': 1, "owner": "Administrator", - "filters_json": json.dumps([["Opportunity", "company", "=", company, False]]), + "filters_json": json.dumps([]), "type": "Bar" }, { @@ -90,7 +90,11 @@ def get_charts(): 'timeseries': 1, "owner": "Administrator", "filters_json": json.dumps([["Opportunity", "company", "=", company, False]]), - "type": "Pie" + "type": "Pie", + "custom_options": json.dumps({ + "truncateLegends": 1, + "maxSlices": 8 + }) }, { "name": "Won Opportunities", @@ -123,7 +127,11 @@ def get_charts(): ["Opportunity", "company", "=", company, False] ]), "owner": "Administrator", - "type": "Donut" + "type": "Donut", + "custom_options": json.dumps({ + "truncateLegends": 1, + "maxSlices": 8 + }) }, { "name": "Territory Wise Sales", @@ -140,7 +148,7 @@ def get_charts(): ["Opportunity", "company", "=", company, False], ["Opportunity", "status", "=", "Converted", False] ]), - "type": "Donut" + "type": "Bar" }, { "name": "Lead Source", @@ -152,7 +160,11 @@ def get_charts(): "document_type": "Lead", 'is_public': 1, "owner": "Administrator", - "type": "Pie" + "type": "Pie", + "custom_options": json.dumps({ + "truncateLegends": 1, + "maxSlices": 8 + }) }] def get_number_cards(): diff --git a/erpnext/crm/desk_page/crm/crm.json b/erpnext/crm/desk_page/crm/crm.json index 2fc4582917..013fabef89 100644 --- a/erpnext/crm/desk_page/crm/crm.json +++ b/erpnext/crm/desk_page/crm/crm.json @@ -42,7 +42,7 @@ "idx": 0, "is_standard": 1, "label": "CRM", - "modified": "2020-05-20 12:11:36.250491", + "modified": "2020-05-28 13:29:28.253749", "modified_by": "Administrator", "module": "CRM", "name": "CRM", @@ -76,7 +76,7 @@ "type": "Report" }, { - "label": "CRM Dashboard", + "label": "Dashboard", "link_to": "CRM", "type": "Dashboard" }