set route options for Report

This commit is contained in:
Nabin Hait 2014-05-12 17:41:23 +05:30
parent 58d0f9d467
commit 2978793e37
2 changed files with 8 additions and 6 deletions

View file

@ -2,7 +2,7 @@ cur_frm.cscript.refresh = function(doc) {
cur_frm.add_custom_button("Show Report", function() {
switch(doc.report_type) {
case "Report Builder":
frappe.set_route("Report", doc.name);
frappe.set_route("Report", doc.ref_doctype, doc.name);
break;
case "Query Report":
frappe.set_route("query-report", doc.name);
@ -12,7 +12,7 @@ cur_frm.cscript.refresh = function(doc) {
break;
}
}, "icon-table")
cur_frm.set_intro("");
switch(doc.report_type) {
case "Report Builder":
@ -30,4 +30,4 @@ cur_frm.cscript.refresh = function(doc) {
cur_frm.set_intro(__("Write a Python file in the same folder where this is saved and return column and result."))
break;
}
}
}

View file

@ -1,6 +1,6 @@
{
"autoname": "field:report_name",
"creation": "2013-03-09 15:45:57.000000",
"creation": "2013-03-09 15:45:57",
"docstatus": 0,
"doctype": "DocType",
"document_type": "System",
@ -101,7 +101,7 @@
],
"icon": "icon-table",
"idx": 1,
"modified": "2014-03-07 15:20:02.000000",
"modified": "2014-05-12 17:08:04.185601",
"modified_by": "Administrator",
"module": "Core",
"name": "Report",
@ -157,5 +157,7 @@
"role": "All",
"submit": 0
}
]
],
"sort_field": "modified",
"sort_order": "DESC"
}