added roles in the report
This commit is contained in:
parent
1644e273de
commit
b63f4400f4
8 changed files with 63 additions and 16 deletions
|
|
@ -5,15 +5,20 @@
|
|||
"disabled": 0,
|
||||
"docstatus": 0,
|
||||
"doctype": "Report",
|
||||
"idx": 0,
|
||||
"idx": 2,
|
||||
"is_standard": "Yes",
|
||||
"json": "{\"add_total_row\": 0, \"sort_by\": \"DocShare.modified\", \"sort_order\": \"desc\", \"sort_by_next\": null, \"filters\": [], \"sort_order_next\": \"desc\", \"columns\": [[\"name\", \"DocShare\"], [\"user\", \"DocShare\"], [\"share_doctype\", \"DocShare\"], [\"share_name\", \"DocShare\"], [\"read\", \"DocShare\"], [\"write\", \"DocShare\"], [\"share\", \"DocShare\"]]}",
|
||||
"modified": "2016-12-05 18:49:38.059352",
|
||||
"modified": "2017-02-24 20:01:16.232286",
|
||||
"modified_by": "Administrator",
|
||||
"module": "Core",
|
||||
"name": "Document Share Report",
|
||||
"owner": "Administrator",
|
||||
"ref_doctype": "DocShare",
|
||||
"report_name": "Document Share Report",
|
||||
"report_type": "Report Builder"
|
||||
"report_type": "Report Builder",
|
||||
"roles": [
|
||||
{
|
||||
"role": "System Manager"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
|
@ -5,14 +5,19 @@
|
|||
"disabled": 0,
|
||||
"docstatus": 0,
|
||||
"doctype": "Report",
|
||||
"idx": 0,
|
||||
"idx": 2,
|
||||
"is_standard": "Yes",
|
||||
"modified": "2017-02-07 12:36:50.992811",
|
||||
"modified": "2017-02-24 19:56:51.141147",
|
||||
"modified_by": "Administrator",
|
||||
"module": "Core",
|
||||
"name": "Feedback Ratings",
|
||||
"owner": "Administrator",
|
||||
"ref_doctype": "Feedback Trigger",
|
||||
"report_name": "Feedback Ratings",
|
||||
"report_type": "Script Report"
|
||||
"report_type": "Script Report",
|
||||
"roles": [
|
||||
{
|
||||
"role": "System Manager"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
|
@ -1,15 +1,23 @@
|
|||
{
|
||||
"add_total_row": 0,
|
||||
"apply_user_permissions": 1,
|
||||
"creation": "2014-06-03 05:20:35.218263",
|
||||
"disabled": 0,
|
||||
"docstatus": 0,
|
||||
"doctype": "Report",
|
||||
"idx": 3,
|
||||
"is_standard": "Yes",
|
||||
"modified": "2014-06-03 07:18:17.218526",
|
||||
"modified": "2017-02-24 20:16:34.069990",
|
||||
"modified_by": "Administrator",
|
||||
"module": "Core",
|
||||
"name": "Permitted Documents For User",
|
||||
"owner": "Administrator",
|
||||
"ref_doctype": "User",
|
||||
"report_name": "Permitted Documents For User",
|
||||
"report_type": "Script Report"
|
||||
"report_type": "Script Report",
|
||||
"roles": [
|
||||
{
|
||||
"role": "System Manager"
|
||||
}
|
||||
]
|
||||
}
|
||||
8
frappe/core/report/todo/todo.js
Normal file
8
frappe/core/report/todo/todo.js
Normal file
|
|
@ -0,0 +1,8 @@
|
|||
// Copyright (c) 2016, Frappe Technologies and contributors
|
||||
// For license information, please see license.txt
|
||||
|
||||
frappe.query_reports["ToDo"] = {
|
||||
"filters": [
|
||||
|
||||
]
|
||||
}
|
||||
|
|
@ -1,16 +1,23 @@
|
|||
{
|
||||
"add_total_row": 0,
|
||||
"apply_user_permissions": 1,
|
||||
"creation": "2013-02-25 14:26:30",
|
||||
"disabled": 0,
|
||||
"docstatus": 0,
|
||||
"doctype": "Report",
|
||||
"idx": 1,
|
||||
"idx": 3,
|
||||
"is_standard": "Yes",
|
||||
"modified": "2014-06-03 07:18:17.374222",
|
||||
"modified": "2017-02-24 20:13:12.217943",
|
||||
"modified_by": "Administrator",
|
||||
"module": "Core",
|
||||
"name": "ToDo",
|
||||
"owner": "Administrator",
|
||||
"ref_doctype": "ToDo",
|
||||
"report_name": "ToDo",
|
||||
"report_type": "Script Report"
|
||||
"report_type": "Script Report",
|
||||
"roles": [
|
||||
{
|
||||
"role": "System Manager"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
|
@ -5,14 +5,28 @@
|
|||
"disabled": 0,
|
||||
"docstatus": 0,
|
||||
"doctype": "Report",
|
||||
"idx": 0,
|
||||
"idx": 2,
|
||||
"is_standard": "Yes",
|
||||
"modified": "2017-01-19 12:57:39.643565",
|
||||
"modified": "2017-02-24 19:57:37.368498",
|
||||
"modified_by": "Administrator",
|
||||
"module": "Geo",
|
||||
"name": "Addresses And Contacts",
|
||||
"owner": "Administrator",
|
||||
"ref_doctype": "Address",
|
||||
"report_name": "Addresses And Contacts",
|
||||
"report_type": "Script Report"
|
||||
"report_type": "Script Report",
|
||||
"roles": [
|
||||
{
|
||||
"role": "Sales User"
|
||||
},
|
||||
{
|
||||
"role": "Purchase User"
|
||||
},
|
||||
{
|
||||
"role": "Maintenance User"
|
||||
},
|
||||
{
|
||||
"role": "Accounts User"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
|
@ -89,7 +89,7 @@ ignore_values = {
|
|||
"Print Format": ["disabled"]
|
||||
}
|
||||
|
||||
ignore_doctypes = ["Has Role"]
|
||||
ignore_doctypes = [""]
|
||||
|
||||
def import_doc(docdict, force=False, data_import=False, pre_process=None,
|
||||
ignore_version=None, reset_permissions=False):
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@ from __future__ import unicode_literals
|
|||
import frappe
|
||||
|
||||
def execute():
|
||||
for data in frappe.get_all('Report', fields=["name"], filters={'is_standard': 'No'}):
|
||||
for data in frappe.get_all('Report', fields=["name"]):
|
||||
doc = frappe.get_doc('Report', data.name)
|
||||
doc.set_doctype_roles()
|
||||
for row in doc.roles:
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue