fix(issue): Replace Make buttons on Issue and Task with a dashboard
diff --git a/erpnext/projects/doctype/task/task.js b/erpnext/projects/doctype/task/task.js
index 93423db..9a8af69 100644
--- a/erpnext/projects/doctype/task/task.js
+++ b/erpnext/projects/doctype/task/task.js
@@ -35,19 +35,6 @@
}
if(!doc.__islocal) {
- if(frappe.model.can_read("Timesheet")) {
- frm.add_custom_button(__("Timesheet"), function() {
- frappe.route_options = {"project": doc.project, "task": doc.name}
- frappe.set_route("List", "Timesheet");
- }, __("View"), true);
- }
- if(frappe.model.can_read("Expense Claim")) {
- frm.add_custom_button(__("Expense Claims"), function() {
- frappe.route_options = {"project": doc.project, "task": doc.name}
- frappe.set_route("List", "Expense Claim");
- }, __("View"), true);
- }
-
if(frm.perm[0].write) {
if(frm.doc.status!=="Completed" && frm.doc.status!=="Cancelled") {
frm.add_custom_button(__("Completed"), function() {
diff --git a/erpnext/projects/doctype/task/task_dashboard.py b/erpnext/projects/doctype/task/task_dashboard.py
new file mode 100644
index 0000000..b776b98
--- /dev/null
+++ b/erpnext/projects/doctype/task/task_dashboard.py
@@ -0,0 +1,19 @@
+from __future__ import unicode_literals
+
+from frappe import _
+
+
+def get_data():
+ return {
+ 'fieldname': 'task',
+ 'transactions': [
+ {
+ 'label': _('Activity'),
+ 'items': ['Timesheet']
+ },
+ {
+ 'label': _('Accounting'),
+ 'items': ['Expense Claim']
+ }
+ ]
+ }
diff --git a/erpnext/support/doctype/issue/issue.js b/erpnext/support/doctype/issue/issue.js
index 03e1aa4..ce75304 100644
--- a/erpnext/support/doctype/issue/issue.js
+++ b/erpnext/support/doctype/issue/issue.js
@@ -4,10 +4,6 @@
},
refresh: function (frm) {
- frm.add_custom_button(__("Task"), function () {
- frappe.set_route("List", "Task", { "issue": frm.doc.name });
- }, __("View"));
-
if (frm.doc.status !== "Closed") {
frm.add_custom_button(__("Close"), function () {
frm.set_value("status", "Closed");
diff --git a/erpnext/support/doctype/issue/issue_dashboard.py b/erpnext/support/doctype/issue/issue_dashboard.py
new file mode 100644
index 0000000..2ac7c81
--- /dev/null
+++ b/erpnext/support/doctype/issue/issue_dashboard.py
@@ -0,0 +1,15 @@
+from __future__ import unicode_literals
+
+from frappe import _
+
+
+def get_data():
+ return {
+ 'fieldname': 'issue',
+ 'transactions': [
+ {
+ 'label': _('Activity'),
+ 'items': ['Task']
+ }
+ ]
+ }