feat: Exported manufacturing dashboard (#22626)
* feat: exported Manufacturing Dashboard
* fix: update use_report_chart fieldname
* fix: add dynamic filter for company in Produced Quantity chart
diff --git a/erpnext/manufacturing/dashboard_chart/completed_operation/completed_operation.json b/erpnext/manufacturing/dashboard_chart/completed_operation/completed_operation.json
new file mode 100644
index 0000000..d74ae2f
--- /dev/null
+++ b/erpnext/manufacturing/dashboard_chart/completed_operation/completed_operation.json
@@ -0,0 +1,28 @@
+{
+ "based_on": "creation",
+ "chart_name": "Completed Operation",
+ "chart_type": "Sum",
+ "creation": "2020-07-08 22:40:22.441658",
+ "docstatus": 0,
+ "doctype": "Dashboard Chart",
+ "document_type": "Work Order Operation",
+ "filters_json": "[[\"Work Order Operation\",\"docstatus\",\"=\",1,false]]",
+ "group_by_type": "Count",
+ "idx": 0,
+ "is_public": 1,
+ "is_standard": 1,
+ "last_synced_on": "2020-07-21 16:57:09.767009",
+ "modified": "2020-07-21 16:57:55.719802",
+ "modified_by": "Administrator",
+ "module": "Manufacturing",
+ "name": "Completed Operation",
+ "number_of_groups": 0,
+ "owner": "Administrator",
+ "time_interval": "Quarterly",
+ "timeseries": 1,
+ "timespan": "Last Year",
+ "type": "Line",
+ "use_report_chart": 0,
+ "value_based_on": "completed_qty",
+ "y_axis": []
+}
\ No newline at end of file
diff --git a/erpnext/manufacturing/dashboard_chart/job_card_analysis/job_card_analysis.json b/erpnext/manufacturing/dashboard_chart/job_card_analysis/job_card_analysis.json
new file mode 100644
index 0000000..e3cbba6
--- /dev/null
+++ b/erpnext/manufacturing/dashboard_chart/job_card_analysis/job_card_analysis.json
@@ -0,0 +1,26 @@
+{
+ "chart_name": "Job Card Analysis",
+ "chart_type": "Report",
+ "creation": "2020-07-08 22:40:22.549096",
+ "custom_options": "{\"barOptions\": {\"stacked\": 1}}",
+ "docstatus": 0,
+ "doctype": "Dashboard Chart",
+ "dynamic_filters_json": "{\"company\":\"frappe.defaults.get_user_default(\\\"Company\\\")\",\"from_date\":\"frappe.defaults.get_user_default(\\\"year_start_date\\\")\",\"to_date\":\"frappe.defaults.get_user_default(\\\"year_end_date\\\")\"}",
+ "filters_json": "{\"docstatus\":1,\"range\":\"Monthly\"}",
+ "idx": 0,
+ "is_public": 1,
+ "is_standard": 1,
+ "modified": "2020-07-21 17:47:06.537924",
+ "modified_by": "Administrator",
+ "module": "Manufacturing",
+ "name": "Job Card Analysis",
+ "number_of_groups": 0,
+ "owner": "Administrator",
+ "report_name": "Job Card Summary",
+ "time_interval": "Yearly",
+ "timeseries": 0,
+ "timespan": "Last Year",
+ "type": "Bar",
+ "use_report_chart": 1,
+ "y_axis": []
+}
\ No newline at end of file
diff --git a/erpnext/manufacturing/dashboard_chart/last_month_downtime_analysis/last_month_downtime_analysis.json b/erpnext/manufacturing/dashboard_chart/last_month_downtime_analysis/last_month_downtime_analysis.json
new file mode 100644
index 0000000..46d2215
--- /dev/null
+++ b/erpnext/manufacturing/dashboard_chart/last_month_downtime_analysis/last_month_downtime_analysis.json
@@ -0,0 +1,26 @@
+{
+ "chart_name": "Last Month Downtime Analysis",
+ "chart_type": "Report",
+ "creation": "2020-07-08 22:40:22.516460",
+ "custom_options": "",
+ "docstatus": 0,
+ "doctype": "Dashboard Chart",
+ "dynamic_filters_json": "{}",
+ "filters_json": "{\"from_date\":\"2020-06-21 00:00:00\",\"to_date\":\"2020-07-21 18:46:45\"}",
+ "idx": 0,
+ "is_public": 1,
+ "is_standard": 1,
+ "modified": "2020-07-21 18:46:50.767333",
+ "modified_by": "Administrator",
+ "module": "Manufacturing",
+ "name": "Last Month Downtime Analysis",
+ "number_of_groups": 0,
+ "owner": "Administrator",
+ "report_name": "Downtime Analysis",
+ "time_interval": "Yearly",
+ "timeseries": 0,
+ "timespan": "Last Year",
+ "type": "Bar",
+ "use_report_chart": 1,
+ "y_axis": []
+}
\ No newline at end of file
diff --git a/erpnext/manufacturing/dashboard_chart/pending_work_order/pending_work_order.json b/erpnext/manufacturing/dashboard_chart/pending_work_order/pending_work_order.json
new file mode 100644
index 0000000..91cd12b
--- /dev/null
+++ b/erpnext/manufacturing/dashboard_chart/pending_work_order/pending_work_order.json
@@ -0,0 +1,26 @@
+{
+ "chart_name": "Pending Work Order",
+ "chart_type": "Report",
+ "creation": "2020-07-08 22:40:22.499217",
+ "custom_options": "{\"axisOptions\": {\"shortenYAxisNumbers\": 1}, \"height\": 300}",
+ "docstatus": 0,
+ "doctype": "Dashboard Chart",
+ "dynamic_filters_json": "{\"company\":\"frappe.defaults.get_user_default(\\\"Company\\\")\",\"from_date\":\"frappe.defaults.get_user_default(\\\"year_start_date\\\")\",\"to_date\":\"frappe.defaults.get_user_default(\\\"year_end_date\\\")\"}",
+ "filters_json": "{\"charts_based_on\":\"Age\"}",
+ "idx": 0,
+ "is_public": 1,
+ "is_standard": 1,
+ "modified": "2020-07-21 17:46:42.917598",
+ "modified_by": "Administrator",
+ "module": "Manufacturing",
+ "name": "Pending Work Order",
+ "number_of_groups": 0,
+ "owner": "Administrator",
+ "report_name": "Work Order Summary",
+ "time_interval": "Yearly",
+ "timeseries": 0,
+ "timespan": "Last Year",
+ "type": "Donut",
+ "use_report_chart": 1,
+ "y_axis": []
+}
\ No newline at end of file
diff --git a/erpnext/manufacturing/dashboard_chart/produced_quantity/produced_quantity.json b/erpnext/manufacturing/dashboard_chart/produced_quantity/produced_quantity.json
new file mode 100644
index 0000000..ba1a29d
--- /dev/null
+++ b/erpnext/manufacturing/dashboard_chart/produced_quantity/produced_quantity.json
@@ -0,0 +1,30 @@
+{
+ "based_on": "modified",
+ "chart_name": "Produced Quantity",
+ "chart_type": "Sum",
+ "creation": "2020-07-08 22:40:22.416285",
+ "custom_options": "",
+ "docstatus": 0,
+ "doctype": "Dashboard Chart",
+ "document_type": "Work Order",
+ "dynamic_filters_json": "[[\"Work Order\",\"company\",\"=\",\"frappe.defaults.get_user_default(\\\"Company\\\")\"]]",
+ "filters_json": "[[\"Work Order\",\"docstatus\",\"=\",\"1\",false]]",
+ "group_by_type": "Count",
+ "idx": 0,
+ "is_public": 1,
+ "is_standard": 1,
+ "last_synced_on": "2020-07-21 17:46:34.058882",
+ "modified": "2020-07-21 17:54:11.233531",
+ "modified_by": "Administrator",
+ "module": "Manufacturing",
+ "name": "Produced Quantity",
+ "number_of_groups": 0,
+ "owner": "Administrator",
+ "time_interval": "Monthly",
+ "timeseries": 1,
+ "timespan": "Last Year",
+ "type": "Line",
+ "use_report_chart": 0,
+ "value_based_on": "produced_qty",
+ "y_axis": []
+}
\ No newline at end of file
diff --git a/erpnext/manufacturing/dashboard_chart/quality_inspection_analysis/quality_inspection_analysis.json b/erpnext/manufacturing/dashboard_chart/quality_inspection_analysis/quality_inspection_analysis.json
new file mode 100644
index 0000000..8388f3d
--- /dev/null
+++ b/erpnext/manufacturing/dashboard_chart/quality_inspection_analysis/quality_inspection_analysis.json
@@ -0,0 +1,25 @@
+{
+ "chart_name": "Quality Inspection Analysis",
+ "chart_type": "Report",
+ "creation": "2020-07-08 22:40:22.483617",
+ "custom_options": "{\"axisOptions\": {\"shortenYAxisNumbers\": 1}, \"height\": 300}",
+ "docstatus": 0,
+ "doctype": "Dashboard Chart",
+ "filters_json": "{\"from_date\":\"2019-07-09\",\"to_date\":\"2020-07-09\"}",
+ "idx": 0,
+ "use_report_chart": 1,
+ "is_public": 1,
+ "is_standard": 1,
+ "modified": "2020-07-09 12:15:51.564487",
+ "modified_by": "Administrator",
+ "module": "Manufacturing",
+ "name": "Quality Inspection Analysis",
+ "number_of_groups": 0,
+ "owner": "Administrator",
+ "report_name": "Quality Inspection Summary",
+ "time_interval": "Yearly",
+ "timeseries": 0,
+ "timespan": "Last Year",
+ "type": "Donut",
+ "y_axis": []
+}
\ No newline at end of file
diff --git a/erpnext/manufacturing/dashboard_chart/work_order_analysis/work_order_analysis.json b/erpnext/manufacturing/dashboard_chart/work_order_analysis/work_order_analysis.json
new file mode 100644
index 0000000..879826a
--- /dev/null
+++ b/erpnext/manufacturing/dashboard_chart/work_order_analysis/work_order_analysis.json
@@ -0,0 +1,26 @@
+{
+ "chart_name": "Work Order Analysis",
+ "chart_type": "Report",
+ "creation": "2020-07-08 22:40:22.465459",
+ "custom_options": "{\"axisOptions\": {\"shortenYAxisNumbers\": 1}, \"height\": 300}",
+ "docstatus": 0,
+ "doctype": "Dashboard Chart",
+ "dynamic_filters_json": "{\"company\":\"frappe.defaults.get_user_default(\\\"Company\\\")\",\"from_date\":\"frappe.defaults.get_user_default(\\\"year_start_date\\\")\",\"to_date\":\"frappe.defaults.get_user_default(\\\"year_end_date\\\")\"}",
+ "filters_json": "{\"charts_based_on\":\"Status\"}",
+ "idx": 0,
+ "is_public": 1,
+ "is_standard": 1,
+ "modified": "2020-07-21 17:50:23.806007",
+ "modified_by": "Administrator",
+ "module": "Manufacturing",
+ "name": "Work Order Analysis",
+ "number_of_groups": 0,
+ "owner": "Administrator",
+ "report_name": "Work Order Summary",
+ "time_interval": "Yearly",
+ "timeseries": 0,
+ "timespan": "Last Year",
+ "type": "Donut",
+ "use_report_chart": 1,
+ "y_axis": []
+}
\ No newline at end of file
diff --git a/erpnext/manufacturing/dashboard_chart/work_order_qty_analysis/work_order_qty_analysis.json b/erpnext/manufacturing/dashboard_chart/work_order_qty_analysis/work_order_qty_analysis.json
new file mode 100644
index 0000000..9357279
--- /dev/null
+++ b/erpnext/manufacturing/dashboard_chart/work_order_qty_analysis/work_order_qty_analysis.json
@@ -0,0 +1,26 @@
+{
+ "chart_name": "Work Order Qty Analysis",
+ "chart_type": "Report",
+ "creation": "2020-07-08 22:40:22.532889",
+ "custom_options": "{\"barOptions\": {\"stacked\": 1}}",
+ "docstatus": 0,
+ "doctype": "Dashboard Chart",
+ "dynamic_filters_json": "{\"company\":\"frappe.defaults.get_user_default(\\\"Company\\\")\",\"from_date\":\"frappe.defaults.get_user_default(\\\"year_start_date\\\")\",\"to_date\":\"frappe.defaults.get_user_default(\\\"year_end_date\\\")\"}",
+ "filters_json": "{\"charts_based_on\":\"Quantity\"}",
+ "idx": 0,
+ "is_public": 1,
+ "is_standard": 1,
+ "modified": "2020-07-21 17:46:59.020709",
+ "modified_by": "Administrator",
+ "module": "Manufacturing",
+ "name": "Work Order Qty Analysis",
+ "number_of_groups": 0,
+ "owner": "Administrator",
+ "report_name": "Work Order Summary",
+ "time_interval": "Yearly",
+ "timeseries": 0,
+ "timespan": "Last Year",
+ "type": "Bar",
+ "use_report_chart": 1,
+ "y_axis": []
+}
\ No newline at end of file
diff --git a/erpnext/manufacturing/manufacturing_dashboard/manufacturing/manufacturing.json b/erpnext/manufacturing/manufacturing_dashboard/manufacturing/manufacturing.json
new file mode 100644
index 0000000..314efe7
--- /dev/null
+++ b/erpnext/manufacturing/manufacturing_dashboard/manufacturing/manufacturing.json
@@ -0,0 +1,62 @@
+{
+ "cards": [
+ {
+ "card": "Monthly Total Work Order"
+ },
+ {
+ "card": "Monthly Completed Work Order"
+ },
+ {
+ "card": "Ongoing Job Card"
+ },
+ {
+ "card": "Monthly Quality Inspection"
+ }
+ ],
+ "charts": [
+ {
+ "chart": "Produced Quantity",
+ "width": "Half"
+ },
+ {
+ "chart": "Completed Operation",
+ "width": "Half"
+ },
+ {
+ "chart": "Work Order Analysis",
+ "width": "Half"
+ },
+ {
+ "chart": "Quality Inspection Analysis",
+ "width": "Half"
+ },
+ {
+ "chart": "Pending Work Order",
+ "width": "Half"
+ },
+ {
+ "chart": "Last Month Downtime Analysis",
+ "width": "Half"
+ },
+ {
+ "chart": "Work Order Qty Analysis",
+ "width": "Full"
+ },
+ {
+ "chart": "Job Card Analysis",
+ "width": "Full"
+ }
+ ],
+ "creation": "2020-07-08 22:40:22.626607",
+ "dashboard_name": "Manufacturing",
+ "docstatus": 0,
+ "doctype": "Dashboard",
+ "idx": 0,
+ "is_default": 0,
+ "is_standard": 1,
+ "modified": "2020-07-09 12:39:39.455039",
+ "modified_by": "Administrator",
+ "module": "Manufacturing",
+ "name": "Manufacturing",
+ "owner": "Administrator"
+}
\ No newline at end of file
diff --git a/erpnext/manufacturing/number_card/monthly_completed_work_order/monthly_completed_work_order.json b/erpnext/manufacturing/number_card/monthly_completed_work_order/monthly_completed_work_order.json
new file mode 100644
index 0000000..36c0b9a
--- /dev/null
+++ b/erpnext/manufacturing/number_card/monthly_completed_work_order/monthly_completed_work_order.json
@@ -0,0 +1,19 @@
+{
+ "creation": "2020-07-08 22:40:22.575086",
+ "docstatus": 0,
+ "doctype": "Number Card",
+ "document_type": "Work Order",
+ "filters_json": "[[\"Work Order\",\"status\",\"=\",\"Completed\"],[\"Work Order\",\"docstatus\",\"=\",1],[\"Work Order\",\"creation\",\"between\",[\"2020-06-08\",\"2020-07-08\"]]]",
+ "function": "Count",
+ "idx": 0,
+ "is_public": 1,
+ "is_standard": 1,
+ "label": "Monthly Completed Work Orders",
+ "modified": "2020-07-09 12:22:54.809813",
+ "modified_by": "Administrator",
+ "module": "Manufacturing",
+ "name": "Monthly Completed Work Order",
+ "owner": "Administrator",
+ "show_percentage_stats": 1,
+ "stats_time_interval": "Weekly"
+}
\ No newline at end of file
diff --git a/erpnext/manufacturing/number_card/monthly_quality_inspection/monthly_quality_inspection.json b/erpnext/manufacturing/number_card/monthly_quality_inspection/monthly_quality_inspection.json
new file mode 100644
index 0000000..91a4536
--- /dev/null
+++ b/erpnext/manufacturing/number_card/monthly_quality_inspection/monthly_quality_inspection.json
@@ -0,0 +1,19 @@
+{
+ "creation": "2020-07-08 22:40:22.606867",
+ "docstatus": 0,
+ "doctype": "Number Card",
+ "document_type": "Quality Inspection",
+ "filters_json": "[[\"Quality Inspection\",\"docstatus\",\"=\",1],[\"Quality Inspection\",\"creation\",\"between\",[\"2020-06-08\",\"2020-07-08\"]]]",
+ "function": "Count",
+ "idx": 0,
+ "is_public": 1,
+ "is_standard": 1,
+ "label": "Monthly Quality Inspections",
+ "modified": "2020-07-09 12:23:34.838154",
+ "modified_by": "Administrator",
+ "module": "Manufacturing",
+ "name": "Monthly Quality Inspection",
+ "owner": "Administrator",
+ "show_percentage_stats": 1,
+ "stats_time_interval": "Weekly"
+}
\ No newline at end of file
diff --git a/erpnext/manufacturing/number_card/monthly_total_work_order/monthly_total_work_order.json b/erpnext/manufacturing/number_card/monthly_total_work_order/monthly_total_work_order.json
new file mode 100644
index 0000000..80d3b15
--- /dev/null
+++ b/erpnext/manufacturing/number_card/monthly_total_work_order/monthly_total_work_order.json
@@ -0,0 +1,19 @@
+{
+ "creation": "2020-07-08 22:40:22.562715",
+ "docstatus": 0,
+ "doctype": "Number Card",
+ "document_type": "Work Order",
+ "filters_json": "[[\"Work Order\",\"docstatus\",\"=\",1],[\"Work Order\",\"creation\",\"between\",[\"2020-06-08\",\"2020-07-08\"]]]",
+ "function": "Count",
+ "idx": 0,
+ "is_public": 1,
+ "is_standard": 1,
+ "label": "Monthly Total Work Orders",
+ "modified": "2020-07-09 12:22:25.698795",
+ "modified_by": "Administrator",
+ "module": "Manufacturing",
+ "name": "Monthly Total Work Order",
+ "owner": "Administrator",
+ "show_percentage_stats": 1,
+ "stats_time_interval": "Weekly"
+}
\ No newline at end of file
diff --git a/erpnext/manufacturing/number_card/ongoing_job_card/ongoing_job_card.json b/erpnext/manufacturing/number_card/ongoing_job_card/ongoing_job_card.json
new file mode 100644
index 0000000..ba23ff3
--- /dev/null
+++ b/erpnext/manufacturing/number_card/ongoing_job_card/ongoing_job_card.json
@@ -0,0 +1,19 @@
+{
+ "creation": "2020-07-08 22:40:22.592042",
+ "docstatus": 0,
+ "doctype": "Number Card",
+ "document_type": "Job Card",
+ "filters_json": "[[\"Job Card\",\"status\",\"!=\",\"Completed\"],[\"Job Card\",\"docstatus\",\"=\",1]]",
+ "function": "Count",
+ "idx": 0,
+ "is_public": 1,
+ "is_standard": 1,
+ "label": "Ongoing Job Cards",
+ "modified": "2020-07-09 12:23:18.218233",
+ "modified_by": "Administrator",
+ "module": "Manufacturing",
+ "name": "Ongoing Job Card",
+ "owner": "Administrator",
+ "show_percentage_stats": 1,
+ "stats_time_interval": "Weekly"
+}
\ No newline at end of file