Merge pull request #7828 from rohitwaghchaure/update_user_roles_to_roles
Changed userrole to has role, commonify role editor of the user
diff --git a/erpnext/accounts/report/accounts_payable/accounts_payable.json b/erpnext/accounts/report/accounts_payable/accounts_payable.json
index 13d28a4..321722a 100644
--- a/erpnext/accounts/report/accounts_payable/accounts_payable.json
+++ b/erpnext/accounts/report/accounts_payable/accounts_payable.json
@@ -1,17 +1,32 @@
{
- "add_total_row": 1,
- "apply_user_permissions": 1,
- "creation": "2013-04-22 16:16:03",
- "docstatus": 0,
- "doctype": "Report",
- "idx": 1,
- "is_standard": "Yes",
- "modified": "2015-07-24 01:08:20.996267",
- "modified_by": "Administrator",
- "module": "Accounts",
- "name": "Accounts Payable",
- "owner": "Administrator",
- "ref_doctype": "Purchase Invoice",
- "report_name": "Accounts Payable",
- "report_type": "Script Report"
-}
+ "add_total_row": 1,
+ "apply_user_permissions": 1,
+ "creation": "2013-04-22 16:16:03",
+ "disabled": 0,
+ "docstatus": 0,
+ "doctype": "Report",
+ "idx": 3,
+ "is_standard": "Yes",
+ "modified": "2017-02-24 20:09:46.150861",
+ "modified_by": "Administrator",
+ "module": "Accounts",
+ "name": "Accounts Payable",
+ "owner": "Administrator",
+ "ref_doctype": "Purchase Invoice",
+ "report_name": "Accounts Payable",
+ "report_type": "Script Report",
+ "roles": [
+ {
+ "role": "Accounts User"
+ },
+ {
+ "role": "Purchase User"
+ },
+ {
+ "role": "Accounts Manager"
+ },
+ {
+ "role": "Auditor"
+ }
+ ]
+}
\ No newline at end of file
diff --git a/erpnext/accounts/report/accounts_payable_summary/accounts_payable_summary.json b/erpnext/accounts/report/accounts_payable_summary/accounts_payable_summary.json
index 8bf8365..70d0860 100644
--- a/erpnext/accounts/report/accounts_payable_summary/accounts_payable_summary.json
+++ b/erpnext/accounts/report/accounts_payable_summary/accounts_payable_summary.json
@@ -5,13 +5,28 @@
"disabled": 0,
"docstatus": 0,
"doctype": "Report",
+ "idx": 2,
"is_standard": "Yes",
- "modified": "2014-11-04 12:09:59.672379",
+ "modified": "2017-02-24 20:11:35.655834",
"modified_by": "Administrator",
"module": "Accounts",
"name": "Accounts Payable Summary",
"owner": "Administrator",
"ref_doctype": "Purchase Invoice",
"report_name": "Accounts Payable Summary",
- "report_type": "Script Report"
+ "report_type": "Script Report",
+ "roles": [
+ {
+ "role": "Accounts User"
+ },
+ {
+ "role": "Purchase User"
+ },
+ {
+ "role": "Accounts Manager"
+ },
+ {
+ "role": "Auditor"
+ }
+ ]
}
\ No newline at end of file
diff --git a/erpnext/accounts/report/accounts_receivable/accounts_receivable.json b/erpnext/accounts/report/accounts_receivable/accounts_receivable.json
index aaed6ed..1c99ac5 100644
--- a/erpnext/accounts/report/accounts_receivable/accounts_receivable.json
+++ b/erpnext/accounts/report/accounts_receivable/accounts_receivable.json
@@ -2,16 +2,25 @@
"add_total_row": 1,
"apply_user_permissions": 1,
"creation": "2013-04-16 11:31:13",
+ "disabled": 0,
"docstatus": 0,
"doctype": "Report",
- "idx": 1,
+ "idx": 3,
"is_standard": "Yes",
- "modified": "2014-06-03 07:18:16.907658",
+ "modified": "2017-03-06 05:52:06.235584",
"modified_by": "Administrator",
"module": "Accounts",
"name": "Accounts Receivable",
"owner": "Administrator",
"ref_doctype": "Sales Invoice",
"report_name": "Accounts Receivable",
- "report_type": "Script Report"
+ "report_type": "Script Report",
+ "roles": [
+ {
+ "role": "Accounts Manager"
+ },
+ {
+ "role": "Accounts User"
+ }
+ ]
}
\ No newline at end of file
diff --git a/erpnext/accounts/report/accounts_receivable_summary/accounts_receivable_summary.json b/erpnext/accounts/report/accounts_receivable_summary/accounts_receivable_summary.json
index a7f6db1..13d4c9d 100644
--- a/erpnext/accounts/report/accounts_receivable_summary/accounts_receivable_summary.json
+++ b/erpnext/accounts/report/accounts_receivable_summary/accounts_receivable_summary.json
@@ -5,13 +5,22 @@
"disabled": 0,
"docstatus": 0,
"doctype": "Report",
+ "idx": 2,
"is_standard": "Yes",
- "modified": "2014-12-01 16:14:40.213259",
+ "modified": "2017-03-06 05:52:23.751082",
"modified_by": "Administrator",
"module": "Accounts",
"name": "Accounts Receivable Summary",
"owner": "Administrator",
"ref_doctype": "Sales Invoice",
"report_name": "Accounts Receivable Summary",
- "report_type": "Script Report"
+ "report_type": "Script Report",
+ "roles": [
+ {
+ "role": "Accounts Manager"
+ },
+ {
+ "role": "Accounts User"
+ }
+ ]
}
\ No newline at end of file
diff --git a/erpnext/accounts/report/asset_depreciation_ledger/asset_depreciation_ledger.json b/erpnext/accounts/report/asset_depreciation_ledger/asset_depreciation_ledger.json
index 67c36fa..bee2829 100644
--- a/erpnext/accounts/report/asset_depreciation_ledger/asset_depreciation_ledger.json
+++ b/erpnext/accounts/report/asset_depreciation_ledger/asset_depreciation_ledger.json
@@ -5,14 +5,19 @@
"disabled": 0,
"docstatus": 0,
"doctype": "Report",
- "idx": 0,
+ "idx": 2,
"is_standard": "Yes",
- "modified": "2016-04-08 14:49:58.133098",
+ "modified": "2017-02-24 20:08:26.084484",
"modified_by": "Administrator",
"module": "Accounts",
"name": "Asset Depreciation Ledger",
"owner": "Administrator",
"ref_doctype": "Asset",
"report_name": "Asset Depreciation Ledger",
- "report_type": "Script Report"
+ "report_type": "Script Report",
+ "roles": [
+ {
+ "role": "Accounts User"
+ }
+ ]
}
\ No newline at end of file
diff --git a/erpnext/accounts/report/asset_depreciations_and_balances/asset_depreciations_and_balances.json b/erpnext/accounts/report/asset_depreciations_and_balances/asset_depreciations_and_balances.json
index 1298d7c..eab95fc 100644
--- a/erpnext/accounts/report/asset_depreciations_and_balances/asset_depreciations_and_balances.json
+++ b/erpnext/accounts/report/asset_depreciations_and_balances/asset_depreciations_and_balances.json
@@ -5,14 +5,19 @@
"disabled": 0,
"docstatus": 0,
"doctype": "Report",
- "idx": 0,
+ "idx": 2,
"is_standard": "Yes",
- "modified": "2016-04-08 14:56:37.235981",
+ "modified": "2017-02-24 20:08:18.660476",
"modified_by": "Administrator",
"module": "Accounts",
"name": "Asset Depreciations and Balances",
"owner": "Administrator",
"ref_doctype": "Asset",
"report_name": "Asset Depreciations and Balances",
- "report_type": "Script Report"
+ "report_type": "Script Report",
+ "roles": [
+ {
+ "role": "Accounts User"
+ }
+ ]
}
\ No newline at end of file
diff --git a/erpnext/accounts/report/balance_sheet/balance_sheet.json b/erpnext/accounts/report/balance_sheet/balance_sheet.json
index af299bb..4e75344 100644
--- a/erpnext/accounts/report/balance_sheet/balance_sheet.json
+++ b/erpnext/accounts/report/balance_sheet/balance_sheet.json
@@ -1,15 +1,29 @@
{
+ "add_total_row": 0,
"apply_user_permissions": 1,
"creation": "2014-07-14 05:24:20.385279",
+ "disabled": 0,
"docstatus": 0,
"doctype": "Report",
+ "idx": 2,
"is_standard": "Yes",
- "modified": "2014-07-14 05:24:20.385279",
+ "modified": "2017-02-24 20:12:47.161127",
"modified_by": "Administrator",
"module": "Accounts",
"name": "Balance Sheet",
"owner": "Administrator",
"ref_doctype": "GL Entry",
"report_name": "Balance Sheet",
- "report_type": "Script Report"
+ "report_type": "Script Report",
+ "roles": [
+ {
+ "role": "Accounts User"
+ },
+ {
+ "role": "Accounts Manager"
+ },
+ {
+ "role": "Auditor"
+ }
+ ]
}
\ No newline at end of file
diff --git a/erpnext/accounts/report/bank_clearance_summary/bank_clearance_summary.json b/erpnext/accounts/report/bank_clearance_summary/bank_clearance_summary.json
index 4cd0e55..88927a6 100644
--- a/erpnext/accounts/report/bank_clearance_summary/bank_clearance_summary.json
+++ b/erpnext/accounts/report/bank_clearance_summary/bank_clearance_summary.json
@@ -1,16 +1,29 @@
{
+ "add_total_row": 0,
"apply_user_permissions": 1,
"creation": "2013-05-01 12:13:25",
+ "disabled": 0,
"docstatus": 0,
"doctype": "Report",
- "idx": 1,
+ "idx": 3,
"is_standard": "Yes",
- "modified": "2014-06-03 07:18:16.921522",
+ "modified": "2017-02-24 20:19:26.257552",
"modified_by": "Administrator",
"module": "Accounts",
"name": "Bank Clearance Summary",
"owner": "Administrator",
"ref_doctype": "Journal Entry",
"report_name": "Bank Clearance Summary",
- "report_type": "Script Report"
+ "report_type": "Script Report",
+ "roles": [
+ {
+ "role": "Accounts User"
+ },
+ {
+ "role": "Accounts Manager"
+ },
+ {
+ "role": "Auditor"
+ }
+ ]
}
\ No newline at end of file
diff --git a/erpnext/accounts/report/bank_reconciliation_statement/bank_reconciliation_statement.json b/erpnext/accounts/report/bank_reconciliation_statement/bank_reconciliation_statement.json
index fb2ee5d..d89f3d7 100644
--- a/erpnext/accounts/report/bank_reconciliation_statement/bank_reconciliation_statement.json
+++ b/erpnext/accounts/report/bank_reconciliation_statement/bank_reconciliation_statement.json
@@ -2,16 +2,28 @@
"add_total_row": 0,
"apply_user_permissions": 1,
"creation": "2013-04-30 18:30:21",
+ "disabled": 0,
"docstatus": 0,
"doctype": "Report",
- "idx": 1,
+ "idx": 3,
"is_standard": "Yes",
- "modified": "2014-06-03 07:18:16.926502",
+ "modified": "2017-02-24 20:19:19.231541",
"modified_by": "Administrator",
"module": "Accounts",
"name": "Bank Reconciliation Statement",
"owner": "Administrator",
"ref_doctype": "Journal Entry",
"report_name": "Bank Reconciliation Statement",
- "report_type": "Script Report"
+ "report_type": "Script Report",
+ "roles": [
+ {
+ "role": "Accounts User"
+ },
+ {
+ "role": "Accounts Manager"
+ },
+ {
+ "role": "Auditor"
+ }
+ ]
}
\ No newline at end of file
diff --git a/erpnext/accounts/report/budget_variance_report/budget_variance_report.json b/erpnext/accounts/report/budget_variance_report/budget_variance_report.json
index 0c31f45..8e49bc5 100644
--- a/erpnext/accounts/report/budget_variance_report/budget_variance_report.json
+++ b/erpnext/accounts/report/budget_variance_report/budget_variance_report.json
@@ -1,16 +1,35 @@
{
+ "add_total_row": 0,
"apply_user_permissions": 1,
"creation": "2013-06-18 12:56:36",
+ "disabled": 0,
"docstatus": 0,
"doctype": "Report",
- "idx": 1,
+ "idx": 3,
"is_standard": "Yes",
- "modified": "2014-06-03 07:18:16.971175",
+ "modified": "2017-02-24 20:19:06.964033",
"modified_by": "Administrator",
"module": "Accounts",
"name": "Budget Variance Report",
"owner": "Administrator",
"ref_doctype": "Cost Center",
"report_name": "Budget Variance Report",
- "report_type": "Script Report"
+ "report_type": "Script Report",
+ "roles": [
+ {
+ "role": "Accounts Manager"
+ },
+ {
+ "role": "Auditor"
+ },
+ {
+ "role": "Accounts User"
+ },
+ {
+ "role": "Sales User"
+ },
+ {
+ "role": "Purchase User"
+ }
+ ]
}
\ No newline at end of file
diff --git a/erpnext/accounts/report/cash_flow/cash_flow.json b/erpnext/accounts/report/cash_flow/cash_flow.json
index d0f2e04..730a798 100644
--- a/erpnext/accounts/report/cash_flow/cash_flow.json
+++ b/erpnext/accounts/report/cash_flow/cash_flow.json
@@ -5,14 +5,25 @@
"disabled": 0,
"docstatus": 0,
"doctype": "Report",
- "idx": 0,
+ "idx": 2,
"is_standard": "Yes",
- "modified": "2015-12-12 10:22:45.383203",
+ "modified": "2017-02-24 20:09:19.748690",
"modified_by": "Administrator",
"module": "Accounts",
"name": "Cash Flow",
"owner": "Administrator",
"ref_doctype": "GL Entry",
"report_name": "Cash Flow",
- "report_type": "Script Report"
+ "report_type": "Script Report",
+ "roles": [
+ {
+ "role": "Accounts User"
+ },
+ {
+ "role": "Accounts Manager"
+ },
+ {
+ "role": "Auditor"
+ }
+ ]
}
\ No newline at end of file
diff --git a/erpnext/accounts/report/delivered_items_to_be_billed/delivered_items_to_be_billed.json b/erpnext/accounts/report/delivered_items_to_be_billed/delivered_items_to_be_billed.json
index f9d830b..f0399b0 100644
--- a/erpnext/accounts/report/delivered_items_to_be_billed/delivered_items_to_be_billed.json
+++ b/erpnext/accounts/report/delivered_items_to_be_billed/delivered_items_to_be_billed.json
@@ -5,9 +5,9 @@
"disabled": 0,
"docstatus": 0,
"doctype": "Report",
- "idx": 1,
+ "idx": 3,
"is_standard": "Yes",
- "modified": "2017-01-02 16:13:27.369266",
+ "modified": "2017-02-24 20:20:20.613388",
"modified_by": "Administrator",
"module": "Accounts",
"name": "Delivered Items To Be Billed",
@@ -15,5 +15,13 @@
"query": "select\n `tabDelivery Note`.`name` as \"Delivery Note:Link/Delivery Note:120\",\n\t`tabDelivery Note`.`customer` as \"Customer:Link/Customer:120\",\n\t`tabDelivery Note`.`customer_name` as \"Customer Name::150\",\n\t`tabDelivery Note`.`posting_date` as \"Date:Date\",\n\t`tabDelivery Note`.`project` as \"Project\",\n\t`tabDelivery Note Item`.`item_code` as \"Item:Link/Item:120\",\n\t(`tabDelivery Note Item`.`base_amount` - `tabDelivery Note Item`.`billed_amt`*ifnull(`tabDelivery Note`.conversion_rate, 1)) as \"Pending Amount:Currency:110\",\n\t`tabDelivery Note Item`.`item_name` as \"Item Name::150\",\n\t`tabDelivery Note Item`.`description` as \"Description::200\",\n\t`tabDelivery Note`.`company` as \"Company:Link/Company:\"\nfrom `tabDelivery Note`, `tabDelivery Note Item`\nwhere \n `tabDelivery Note`.name = `tabDelivery Note Item`.parent \n and `tabDelivery Note`.docstatus = 1 \n and `tabDelivery Note`.`status` not in (\"Stopped\", \"Closed\") \n and `tabDelivery Note Item`.amount > 0\n and `tabDelivery Note Item`.billed_amt < `tabDelivery Note Item`.amount\norder by `tabDelivery Note`.`name` desc",
"ref_doctype": "Sales Invoice",
"report_name": "Delivered Items To Be Billed",
- "report_type": "Script Report"
+ "report_type": "Script Report",
+ "roles": [
+ {
+ "role": "Accounts Manager"
+ },
+ {
+ "role": "Accounts User"
+ }
+ ]
}
\ No newline at end of file
diff --git a/erpnext/accounts/report/general_ledger/general_ledger.json b/erpnext/accounts/report/general_ledger/general_ledger.json
index af2095d..4ff8ed2 100644
--- a/erpnext/accounts/report/general_ledger/general_ledger.json
+++ b/erpnext/accounts/report/general_ledger/general_ledger.json
@@ -1,16 +1,29 @@
{
+ "add_total_row": 0,
"apply_user_permissions": 1,
"creation": "2013-12-06 13:22:23",
+ "disabled": 0,
"docstatus": 0,
"doctype": "Report",
- "idx": 1,
+ "idx": 3,
"is_standard": "Yes",
- "modified": "2014-06-03 07:18:17.072046",
+ "modified": "2017-02-24 20:17:51.995451",
"modified_by": "Administrator",
"module": "Accounts",
"name": "General Ledger",
"owner": "Administrator",
"ref_doctype": "GL Entry",
"report_name": "General Ledger",
- "report_type": "Script Report"
+ "report_type": "Script Report",
+ "roles": [
+ {
+ "role": "Accounts User"
+ },
+ {
+ "role": "Accounts Manager"
+ },
+ {
+ "role": "Auditor"
+ }
+ ]
}
\ No newline at end of file
diff --git a/erpnext/accounts/report/gross_profit/gross_profit.json b/erpnext/accounts/report/gross_profit/gross_profit.json
index 69555d0..9cfb062 100644
--- a/erpnext/accounts/report/gross_profit/gross_profit.json
+++ b/erpnext/accounts/report/gross_profit/gross_profit.json
@@ -1,16 +1,26 @@
{
+ "add_total_row": 0,
"apply_user_permissions": 1,
"creation": "2013-02-25 17:03:34",
+ "disabled": 0,
"docstatus": 0,
"doctype": "Report",
- "idx": 1,
+ "idx": 3,
"is_standard": "Yes",
- "modified": "2014-09-18 19:00:50.263854",
+ "modified": "2017-02-24 20:12:22.464240",
"modified_by": "Administrator",
"module": "Accounts",
"name": "Gross Profit",
"owner": "Administrator",
"ref_doctype": "Sales Invoice",
"report_name": "Gross Profit",
- "report_type": "Script Report"
+ "report_type": "Script Report",
+ "roles": [
+ {
+ "role": "Accounts Manager"
+ },
+ {
+ "role": "Accounts User"
+ }
+ ]
}
\ No newline at end of file
diff --git a/erpnext/accounts/report/item_wise_purchase_register/item_wise_purchase_register.json b/erpnext/accounts/report/item_wise_purchase_register/item_wise_purchase_register.json
index 4df24d8..2062727 100644
--- a/erpnext/accounts/report/item_wise_purchase_register/item_wise_purchase_register.json
+++ b/erpnext/accounts/report/item_wise_purchase_register/item_wise_purchase_register.json
@@ -2,16 +2,31 @@
"add_total_row": 1,
"apply_user_permissions": 1,
"creation": "2013-06-05 15:37:30",
+ "disabled": 0,
"docstatus": 0,
"doctype": "Report",
- "idx": 1,
+ "idx": 3,
"is_standard": "Yes",
- "modified": "2014-06-03 07:18:17.113416",
+ "modified": "2017-02-24 20:17:31.238117",
"modified_by": "Administrator",
"module": "Accounts",
"name": "Item-wise Purchase Register",
"owner": "Administrator",
"ref_doctype": "Purchase Invoice",
"report_name": "Item-wise Purchase Register",
- "report_type": "Script Report"
+ "report_type": "Script Report",
+ "roles": [
+ {
+ "role": "Accounts User"
+ },
+ {
+ "role": "Purchase User"
+ },
+ {
+ "role": "Auditor"
+ },
+ {
+ "role": "Accounts Manager"
+ }
+ ]
}
\ No newline at end of file
diff --git a/erpnext/accounts/report/item_wise_sales_register/item_wise_sales_register.json b/erpnext/accounts/report/item_wise_sales_register/item_wise_sales_register.json
index 9b47d4f..f6b2898 100644
--- a/erpnext/accounts/report/item_wise_sales_register/item_wise_sales_register.json
+++ b/erpnext/accounts/report/item_wise_sales_register/item_wise_sales_register.json
@@ -2,16 +2,25 @@
"add_total_row": 1,
"apply_user_permissions": 1,
"creation": "2013-05-13 17:50:55",
+ "disabled": 0,
"docstatus": 0,
"doctype": "Report",
- "idx": 1,
+ "idx": 3,
"is_standard": "Yes",
- "modified": "2014-06-03 07:18:17.123848",
+ "modified": "2017-02-24 20:17:17.638545",
"modified_by": "Administrator",
"module": "Accounts",
"name": "Item-wise Sales Register",
"owner": "Administrator",
"ref_doctype": "Sales Invoice",
"report_name": "Item-wise Sales Register",
- "report_type": "Script Report"
+ "report_type": "Script Report",
+ "roles": [
+ {
+ "role": "Accounts Manager"
+ },
+ {
+ "role": "Accounts User"
+ }
+ ]
}
\ No newline at end of file
diff --git a/erpnext/accounts/report/ordered_items_to_be_billed/ordered_items_to_be_billed.json b/erpnext/accounts/report/ordered_items_to_be_billed/ordered_items_to_be_billed.json
index 96cf1a3..db3c9d2 100644
--- a/erpnext/accounts/report/ordered_items_to_be_billed/ordered_items_to_be_billed.json
+++ b/erpnext/accounts/report/ordered_items_to_be_billed/ordered_items_to_be_billed.json
@@ -5,9 +5,9 @@
"disabled": 0,
"docstatus": 0,
"doctype": "Report",
- "idx": 1,
+ "idx": 3,
"is_standard": "Yes",
- "modified": "2017-01-02 14:53:06.277319",
+ "modified": "2017-02-24 20:20:13.972178",
"modified_by": "Administrator",
"module": "Accounts",
"name": "Ordered Items To Be Billed",
@@ -15,5 +15,13 @@
"query": "select \n `tabSales Order`.`name` as \"Sales Order:Link/Sales Order:120\",\n `tabSales Order`.`customer` as \"Customer:Link/Customer:120\",\n `tabSales Order`.`customer_name` as \"Customer Name:150\",\n`tabSales Order`.`status` as \"Status\",\n `tabSales Order`.`transaction_date` as \"Date:Date\",\n `tabSales Order`.`project` as \"Project\",\n `tabSales Order Item`.item_code as \"Item:Link/Item:120\",\n `tabSales Order Item`.base_amount as \"Amount:Currency:110\",\n (`tabSales Order Item`.billed_amt * ifnull(`tabSales Order`.conversion_rate, 1)) as \"Billed Amount:Currency:110\",\n (`tabSales Order Item`.base_amount - (`tabSales Order Item`.billed_amt * ifnull(`tabSales Order`.conversion_rate, 1))) as \"Pending Amount:Currency:120\",\n `tabSales Order Item`.item_name as \"Item Name::150\",\n `tabSales Order Item`.description as \"Description::200\",\n `tabSales Order`.`company` as \"Company:Link/Company:\"\nfrom\n `tabSales Order`, `tabSales Order Item`\nwhere\n `tabSales Order Item`.`parent` = `tabSales Order`.`name`\n and `tabSales Order`.docstatus = 1\n and `tabSales Order`.status != \"Closed\"\n and `tabSales Order Item`.amount > 0\n and `tabSales Order Item`.billed_amt < `tabSales Order Item`.amount\norder by `tabSales Order`.transaction_date asc",
"ref_doctype": "Sales Invoice",
"report_name": "Ordered Items To Be Billed",
- "report_type": "Script Report"
+ "report_type": "Script Report",
+ "roles": [
+ {
+ "role": "Accounts Manager"
+ },
+ {
+ "role": "Accounts User"
+ }
+ ]
}
\ No newline at end of file
diff --git a/erpnext/accounts/report/payment_period_based_on_invoice_date/payment_period_based_on_invoice_date.json b/erpnext/accounts/report/payment_period_based_on_invoice_date/payment_period_based_on_invoice_date.json
index 3546114..65cb2ef 100644
--- a/erpnext/accounts/report/payment_period_based_on_invoice_date/payment_period_based_on_invoice_date.json
+++ b/erpnext/accounts/report/payment_period_based_on_invoice_date/payment_period_based_on_invoice_date.json
@@ -2,16 +2,28 @@
"add_total_row": 1,
"apply_user_permissions": 1,
"creation": "2013-12-02 17:06:37",
+ "disabled": 0,
"docstatus": 0,
"doctype": "Report",
- "idx": 1,
+ "idx": 3,
"is_standard": "Yes",
- "modified": "2014-06-03 07:18:17.207997",
+ "modified": "2017-02-24 20:16:43.005325",
"modified_by": "Administrator",
"module": "Accounts",
"name": "Payment Period Based On Invoice Date",
"owner": "Administrator",
"ref_doctype": "Journal Entry",
"report_name": "Payment Period Based On Invoice Date",
- "report_type": "Script Report"
+ "report_type": "Script Report",
+ "roles": [
+ {
+ "role": "Accounts User"
+ },
+ {
+ "role": "Accounts Manager"
+ },
+ {
+ "role": "Auditor"
+ }
+ ]
}
\ No newline at end of file
diff --git a/erpnext/accounts/report/profit_and_loss_statement/profit_and_loss_statement.json b/erpnext/accounts/report/profit_and_loss_statement/profit_and_loss_statement.json
index a7608d8..d92d6e8 100644
--- a/erpnext/accounts/report/profit_and_loss_statement/profit_and_loss_statement.json
+++ b/erpnext/accounts/report/profit_and_loss_statement/profit_and_loss_statement.json
@@ -5,13 +5,25 @@
"disabled": 0,
"docstatus": 0,
"doctype": "Report",
+ "idx": 2,
"is_standard": "Yes",
- "modified": "2014-07-18 11:43:33.173207",
+ "modified": "2017-02-24 20:12:40.282376",
"modified_by": "Administrator",
"module": "Accounts",
"name": "Profit and Loss Statement",
"owner": "Administrator",
"ref_doctype": "GL Entry",
"report_name": "Profit and Loss Statement",
- "report_type": "Script Report"
+ "report_type": "Script Report",
+ "roles": [
+ {
+ "role": "Accounts User"
+ },
+ {
+ "role": "Accounts Manager"
+ },
+ {
+ "role": "Auditor"
+ }
+ ]
}
\ No newline at end of file
diff --git a/erpnext/accounts/report/profitability_analysis/profitability_analysis.json b/erpnext/accounts/report/profitability_analysis/profitability_analysis.json
index d9c00c6..29faf63 100644
--- a/erpnext/accounts/report/profitability_analysis/profitability_analysis.json
+++ b/erpnext/accounts/report/profitability_analysis/profitability_analysis.json
@@ -5,14 +5,25 @@
"disabled": 0,
"docstatus": 0,
"doctype": "Report",
- "idx": 0,
+ "idx": 2,
"is_standard": "Yes",
- "modified": "2016-08-24 05:47:09.931202",
+ "modified": "2017-02-24 20:03:58.156580",
"modified_by": "Administrator",
"module": "Accounts",
"name": "Profitability Analysis",
"owner": "Administrator",
"ref_doctype": "GL Entry",
"report_name": "Profitability Analysis",
- "report_type": "Script Report"
+ "report_type": "Script Report",
+ "roles": [
+ {
+ "role": "Accounts User"
+ },
+ {
+ "role": "Accounts Manager"
+ },
+ {
+ "role": "Auditor"
+ }
+ ]
}
\ No newline at end of file
diff --git a/erpnext/accounts/report/purchase_invoice_trends/purchase_invoice_trends.json b/erpnext/accounts/report/purchase_invoice_trends/purchase_invoice_trends.json
index 08231b4..f167d06 100644
--- a/erpnext/accounts/report/purchase_invoice_trends/purchase_invoice_trends.json
+++ b/erpnext/accounts/report/purchase_invoice_trends/purchase_invoice_trends.json
@@ -1,16 +1,32 @@
{
+ "add_total_row": 0,
"apply_user_permissions": 1,
"creation": "2013-06-13 18:46:55",
+ "disabled": 0,
"docstatus": 0,
"doctype": "Report",
- "idx": 1,
+ "idx": 3,
"is_standard": "Yes",
- "modified": "2014-06-03 07:18:17.239496",
+ "modified": "2017-02-24 20:16:25.027061",
"modified_by": "Administrator",
"module": "Accounts",
"name": "Purchase Invoice Trends",
"owner": "Administrator",
"ref_doctype": "Purchase Invoice",
"report_name": "Purchase Invoice Trends",
- "report_type": "Script Report"
+ "report_type": "Script Report",
+ "roles": [
+ {
+ "role": "Accounts User"
+ },
+ {
+ "role": "Purchase User"
+ },
+ {
+ "role": "Accounts Manager"
+ },
+ {
+ "role": "Auditor"
+ }
+ ]
}
\ No newline at end of file
diff --git a/erpnext/accounts/report/purchase_order_items_to_be_billed/purchase_order_items_to_be_billed.json b/erpnext/accounts/report/purchase_order_items_to_be_billed/purchase_order_items_to_be_billed.json
index 16ed1be..3645ec0 100644
--- a/erpnext/accounts/report/purchase_order_items_to_be_billed/purchase_order_items_to_be_billed.json
+++ b/erpnext/accounts/report/purchase_order_items_to_be_billed/purchase_order_items_to_be_billed.json
@@ -5,9 +5,9 @@
"disabled": 0,
"docstatus": 0,
"doctype": "Report",
- "idx": 1,
+ "idx": 3,
"is_standard": "Yes",
- "modified": "2017-01-02 12:08:36.400900",
+ "modified": "2017-02-24 20:00:24.302988",
"modified_by": "Administrator",
"module": "Accounts",
"name": "Purchase Order Items To Be Billed",
@@ -15,5 +15,19 @@
"query": "select \n `tabPurchase Order`.`name` as \"Purchase Order:Link/Purchase Order:120\",\n `tabPurchase Order`.`transaction_date` as \"Date:Date:100\",\n\t`tabPurchase Order`.`supplier` as \"Supplier:Link/Supplier:120\",\n\t`tabPurchase Order`.`supplier_name` as \"Supplier Name::150\",\n\t`tabPurchase Order Item`.`project` as \"Project\",\n\t`tabPurchase Order Item`.item_code as \"Item Code:Link/Item:120\",\n\t`tabPurchase Order Item`.base_amount as \"Amount:Currency:100\",\n\t(`tabPurchase Order Item`.billed_amt * ifnull(`tabPurchase Order`.conversion_rate, 1)) as \"Billed Amount:Currency:100\", \n\t(`tabPurchase Order Item`.base_amount - (`tabPurchase Order Item`.billed_amt * ifnull(`tabPurchase Order`.conversion_rate, 1))) as \"Amount to Bill:Currency:100\",\n\t`tabPurchase Order Item`.item_name as \"Item Name::150\",\n\t`tabPurchase Order Item`.description as \"Description::200\",\n\t`tabPurchase Order`.company as \"Company:Link/Company:\"\nfrom\n\t`tabPurchase Order`, `tabPurchase Order Item`\nwhere\n\t`tabPurchase Order Item`.`parent` = `tabPurchase Order`.`name`\n\tand `tabPurchase Order`.docstatus = 1\n\tand `tabPurchase Order`.status != \"Closed\"\n and `tabPurchase Order Item`.amount > 0\n\tand (`tabPurchase Order Item`.billed_amt * ifnull(`tabPurchase Order`.conversion_rate, 1)) < `tabPurchase Order Item`.base_amount\norder by `tabPurchase Order`.transaction_date asc",
"ref_doctype": "Purchase Invoice",
"report_name": "Purchase Order Items To Be Billed",
- "report_type": "Script Report"
+ "report_type": "Script Report",
+ "roles": [
+ {
+ "role": "Accounts User"
+ },
+ {
+ "role": "Purchase User"
+ },
+ {
+ "role": "Auditor"
+ },
+ {
+ "role": "Accounts Manager"
+ }
+ ]
}
\ No newline at end of file
diff --git a/erpnext/accounts/report/purchase_register/purchase_register.json b/erpnext/accounts/report/purchase_register/purchase_register.json
index 6c5bc30..9f2c667 100644
--- a/erpnext/accounts/report/purchase_register/purchase_register.json
+++ b/erpnext/accounts/report/purchase_register/purchase_register.json
@@ -2,16 +2,31 @@
"add_total_row": 1,
"apply_user_permissions": 1,
"creation": "2013-04-29 16:13:11",
+ "disabled": 0,
"docstatus": 0,
"doctype": "Report",
- "idx": 1,
+ "idx": 3,
"is_standard": "Yes",
- "modified": "2014-06-03 07:18:17.265444",
+ "modified": "2017-02-24 20:15:45.590238",
"modified_by": "Administrator",
"module": "Accounts",
"name": "Purchase Register",
"owner": "Administrator",
"ref_doctype": "Purchase Invoice",
"report_name": "Purchase Register",
- "report_type": "Script Report"
+ "report_type": "Script Report",
+ "roles": [
+ {
+ "role": "Accounts User"
+ },
+ {
+ "role": "Purchase User"
+ },
+ {
+ "role": "Accounts Manager"
+ },
+ {
+ "role": "Auditor"
+ }
+ ]
}
\ No newline at end of file
diff --git a/erpnext/accounts/report/received_items_to_be_billed/received_items_to_be_billed.json b/erpnext/accounts/report/received_items_to_be_billed/received_items_to_be_billed.json
index 0379a5c..906481f 100644
--- a/erpnext/accounts/report/received_items_to_be_billed/received_items_to_be_billed.json
+++ b/erpnext/accounts/report/received_items_to_be_billed/received_items_to_be_billed.json
@@ -5,9 +5,9 @@
"disabled": 0,
"docstatus": 0,
"doctype": "Report",
- "idx": 1,
+ "idx": 3,
"is_standard": "Yes",
- "modified": "2017-01-02 16:05:01.929390",
+ "modified": "2017-02-24 19:59:52.887744",
"modified_by": "Administrator",
"module": "Accounts",
"name": "Received Items To Be Billed",
@@ -15,5 +15,19 @@
"query": "select\n `tabPurchase Receipt`.`name` as \"Purchase Receipt:Link/Purchase Receipt:120\",\n `tabPurchase Receipt`.`supplier` as \"Supplier:Link/Supplier:120\",\n\t`tabPurchase Receipt`.`supplier_name` as \"Supplier Name::150\",\n\t`tabPurchase Receipt`.`posting_date` as \"Date:Date\",\n\t`tabPurchase Receipt Item`.`project` as \"Project\",\n\t`tabPurchase Receipt Item`.`item_code` as \"Item:Link/Item:120\",\n\t(`tabPurchase Receipt Item`.`base_amount` - `tabPurchase Receipt Item`.`billed_amt`*ifnull(`tabPurchase Receipt`.conversion_rate, 1)) as \"Pending Amount:Currency:110\",\n\t`tabPurchase Receipt Item`.`item_name` as \"Item Name::150\",\n\t`tabPurchase Receipt Item`.`description` as \"Description::200\",\n\t`tabPurchase Receipt`.`company` as \"Company:Link/Company:\"\nfrom `tabPurchase Receipt`, `tabPurchase Receipt Item`\nwhere\n `tabPurchase Receipt`.name = `tabPurchase Receipt Item`.parent \n and `tabPurchase Receipt`.docstatus = 1 \n and `tabPurchase Receipt`.status != \"Closed\" \n and `tabPurchase Receipt Item`.amount > 0\n and `tabPurchase Receipt Item`.billed_amt < `tabPurchase Receipt Item`.amount\norder by `tabPurchase Receipt`.`name` desc",
"ref_doctype": "Purchase Invoice",
"report_name": "Received Items To Be Billed",
- "report_type": "Script Report"
+ "report_type": "Script Report",
+ "roles": [
+ {
+ "role": "Accounts User"
+ },
+ {
+ "role": "Purchase User"
+ },
+ {
+ "role": "Accounts Manager"
+ },
+ {
+ "role": "Auditor"
+ }
+ ]
}
\ No newline at end of file
diff --git a/erpnext/accounts/report/sales_invoice_trends/sales_invoice_trends.json b/erpnext/accounts/report/sales_invoice_trends/sales_invoice_trends.json
index 13b9a20..d7837e3 100644
--- a/erpnext/accounts/report/sales_invoice_trends/sales_invoice_trends.json
+++ b/erpnext/accounts/report/sales_invoice_trends/sales_invoice_trends.json
@@ -1,16 +1,26 @@
{
+ "add_total_row": 0,
"apply_user_permissions": 1,
"creation": "2013-06-13 18:44:21",
+ "disabled": 0,
"docstatus": 0,
"doctype": "Report",
- "idx": 1,
+ "idx": 3,
"is_standard": "Yes",
- "modified": "2014-06-03 07:18:17.291463",
+ "modified": "2017-02-24 20:15:12.885723",
"modified_by": "Administrator",
"module": "Accounts",
"name": "Sales Invoice Trends",
"owner": "Administrator",
"ref_doctype": "Sales Invoice",
"report_name": "Sales Invoice Trends",
- "report_type": "Script Report"
+ "report_type": "Script Report",
+ "roles": [
+ {
+ "role": "Accounts Manager"
+ },
+ {
+ "role": "Accounts User"
+ }
+ ]
}
\ No newline at end of file
diff --git a/erpnext/accounts/report/sales_partners_commission/sales_partners_commission.json b/erpnext/accounts/report/sales_partners_commission/sales_partners_commission.json
index 592e93d..9e8670a 100644
--- a/erpnext/accounts/report/sales_partners_commission/sales_partners_commission.json
+++ b/erpnext/accounts/report/sales_partners_commission/sales_partners_commission.json
@@ -1,17 +1,27 @@
{
- "apply_user_permissions": 1,
- "creation": "2013-05-06 12:28:23",
- "docstatus": 0,
- "doctype": "Report",
- "idx": 1,
- "is_standard": "Yes",
- "modified": "2015-02-12 07:18:17.302063",
- "modified_by": "Administrator",
- "module": "Accounts",
- "name": "Sales Partners Commission",
- "owner": "Administrator",
- "query": "SELECT\n sales_partner as \"Sales Partner:Link/Sales Partner:150\",\n\tsum(base_net_total) as \"Invoiced Amount (Exculsive Tax):Currency:210\",\n\tsum(total_commission) as \"Total Commission:Currency:150\",\n\tsum(total_commission)*100/sum(base_net_total) as \"Average Commission Rate:Currency:170\"\nFROM\n\t`tabSales Invoice`\nWHERE\n\tdocstatus = 1 and ifnull(base_net_total, 0) > 0 and ifnull(total_commission, 0) > 0\nGROUP BY\n\tsales_partner\nORDER BY\n\t\"Total Commission:Currency:120\"",
- "ref_doctype": "Sales Invoice",
- "report_name": "Sales Partners Commission",
- "report_type": "Query Report"
-}
+ "add_total_row": 0,
+ "apply_user_permissions": 1,
+ "creation": "2013-05-06 12:28:23",
+ "disabled": 0,
+ "docstatus": 0,
+ "doctype": "Report",
+ "idx": 3,
+ "is_standard": "Yes",
+ "modified": "2017-03-06 05:52:57.645281",
+ "modified_by": "Administrator",
+ "module": "Accounts",
+ "name": "Sales Partners Commission",
+ "owner": "Administrator",
+ "query": "SELECT\n sales_partner as \"Sales Partner:Link/Sales Partner:150\",\n\tsum(base_net_total) as \"Invoiced Amount (Exculsive Tax):Currency:210\",\n\tsum(total_commission) as \"Total Commission:Currency:150\",\n\tsum(total_commission)*100/sum(base_net_total) as \"Average Commission Rate:Currency:170\"\nFROM\n\t`tabSales Invoice`\nWHERE\n\tdocstatus = 1 and ifnull(base_net_total, 0) > 0 and ifnull(total_commission, 0) > 0\nGROUP BY\n\tsales_partner\nORDER BY\n\t\"Total Commission:Currency:120\"",
+ "ref_doctype": "Sales Invoice",
+ "report_name": "Sales Partners Commission",
+ "report_type": "Query Report",
+ "roles": [
+ {
+ "role": "Accounts Manager"
+ },
+ {
+ "role": "Accounts User"
+ }
+ ]
+}
\ No newline at end of file
diff --git a/erpnext/accounts/report/sales_register/sales_register.json b/erpnext/accounts/report/sales_register/sales_register.json
index 3781f44..fbc0457 100644
--- a/erpnext/accounts/report/sales_register/sales_register.json
+++ b/erpnext/accounts/report/sales_register/sales_register.json
@@ -2,16 +2,25 @@
"add_total_row": 1,
"apply_user_permissions": 1,
"creation": "2013-04-23 18:15:29",
+ "disabled": 0,
"docstatus": 0,
"doctype": "Report",
- "idx": 1,
+ "idx": 3,
"is_standard": "Yes",
- "modified": "2014-06-03 07:18:17.317451",
+ "modified": "2017-02-24 20:14:35.208989",
"modified_by": "Administrator",
"module": "Accounts",
"name": "Sales Register",
"owner": "Administrator",
"ref_doctype": "Sales Invoice",
"report_name": "Sales Register",
- "report_type": "Script Report"
+ "report_type": "Script Report",
+ "roles": [
+ {
+ "role": "Accounts Manager"
+ },
+ {
+ "role": "Accounts User"
+ }
+ ]
}
\ No newline at end of file
diff --git a/erpnext/accounts/report/trial_balance/trial_balance.json b/erpnext/accounts/report/trial_balance/trial_balance.json
index 0dbb4dc..8ed96a7 100644
--- a/erpnext/accounts/report/trial_balance/trial_balance.json
+++ b/erpnext/accounts/report/trial_balance/trial_balance.json
@@ -5,13 +5,25 @@
"disabled": 0,
"docstatus": 0,
"doctype": "Report",
+ "idx": 2,
"is_standard": "Yes",
- "modified": "2014-07-22 11:41:23.743564",
+ "modified": "2017-02-24 20:12:33.520866",
"modified_by": "Administrator",
"module": "Accounts",
"name": "Trial Balance",
"owner": "Administrator",
"ref_doctype": "GL Entry",
"report_name": "Trial Balance",
- "report_type": "Script Report"
+ "report_type": "Script Report",
+ "roles": [
+ {
+ "role": "Accounts User"
+ },
+ {
+ "role": "Accounts Manager"
+ },
+ {
+ "role": "Auditor"
+ }
+ ]
}
\ No newline at end of file
diff --git a/erpnext/accounts/report/trial_balance_for_party/trial_balance_for_party.json b/erpnext/accounts/report/trial_balance_for_party/trial_balance_for_party.json
index 630462d..01a0895 100644
--- a/erpnext/accounts/report/trial_balance_for_party/trial_balance_for_party.json
+++ b/erpnext/accounts/report/trial_balance_for_party/trial_balance_for_party.json
@@ -5,13 +5,25 @@
"disabled": 0,
"docstatus": 0,
"doctype": "Report",
+ "idx": 2,
"is_standard": "Yes",
- "modified": "2015-09-22 10:28:45.762272",
+ "modified": "2017-02-24 20:09:30.979664",
"modified_by": "Administrator",
"module": "Accounts",
"name": "Trial Balance for Party",
"owner": "Administrator",
"ref_doctype": "GL Entry",
"report_name": "Trial Balance for Party",
- "report_type": "Script Report"
+ "report_type": "Script Report",
+ "roles": [
+ {
+ "role": "Accounts User"
+ },
+ {
+ "role": "Accounts Manager"
+ },
+ {
+ "role": "Auditor"
+ }
+ ]
}
\ No newline at end of file
diff --git a/erpnext/accounts/report/unpaid_expense_claim/unpaid_expense_claim.json b/erpnext/accounts/report/unpaid_expense_claim/unpaid_expense_claim.json
index a1087c0..966d5bb 100644
--- a/erpnext/accounts/report/unpaid_expense_claim/unpaid_expense_claim.json
+++ b/erpnext/accounts/report/unpaid_expense_claim/unpaid_expense_claim.json
@@ -5,14 +5,25 @@
"disabled": 0,
"docstatus": 0,
"doctype": "Report",
- "idx": 0,
+ "idx": 2,
"is_standard": "Yes",
- "modified": "2017-01-04 16:26:18.309717",
+ "modified": "2017-02-24 19:59:29.747039",
"modified_by": "Administrator",
"module": "Accounts",
"name": "Unpaid Expense Claim",
"owner": "Administrator",
"ref_doctype": "Expense Claim",
"report_name": "Unpaid Expense Claim",
- "report_type": "Script Report"
+ "report_type": "Script Report",
+ "roles": [
+ {
+ "role": "HR Manager"
+ },
+ {
+ "role": "Expense Approver"
+ },
+ {
+ "role": "HR User"
+ }
+ ]
}
\ No newline at end of file
diff --git a/erpnext/buying/report/item_wise_purchase_history/item_wise_purchase_history.json b/erpnext/buying/report/item_wise_purchase_history/item_wise_purchase_history.json
index 4a8d608..521c68c 100644
--- a/erpnext/buying/report/item_wise_purchase_history/item_wise_purchase_history.json
+++ b/erpnext/buying/report/item_wise_purchase_history/item_wise_purchase_history.json
@@ -5,9 +5,9 @@
"disabled": 0,
"docstatus": 0,
"doctype": "Report",
- "idx": 1,
+ "idx": 3,
"is_standard": "Yes",
- "modified": "2016-04-01 08:26:52.361800",
+ "modified": "2017-02-24 20:08:57.446613",
"modified_by": "Administrator",
"module": "Buying",
"name": "Item-wise Purchase History",
@@ -15,5 +15,16 @@
"query": "select\n po_item.item_code as \"Item Code:Link/Item:120\",\n\tpo_item.item_name as \"Item Name::120\",\n po_item.item_group as \"Item Group:Link/Item Group:120\",\n\tpo_item.description as \"Description::150\",\n\tpo_item.qty as \"Qty:Float:100\",\n\tpo_item.uom as \"UOM:Link/UOM:80\",\n\tpo_item.base_rate as \"Rate:Currency:120\",\n\tpo_item.base_amount as \"Amount:Currency:120\",\n\tpo.name as \"Purchase Order:Link/Purchase Order:120\",\n\tpo.transaction_date as \"Transaction Date:Date:140\",\n\tpo.supplier as \"Supplier:Link/Supplier:130\",\n sup.supplier_name as \"Supplier Name::150\",\n\tpo_item.project as \"Project:Link/Project:130\",\n\tifnull(po_item.received_qty, 0) as \"Received Qty:Float:120\",\n\tpo.company as \"Company:Link/Company:\"\nfrom\n\t`tabPurchase Order` po, `tabPurchase Order Item` po_item, `tabSupplier` sup\nwhere\n\tpo.name = po_item.parent and po.supplier = sup.name and po.docstatus = 1\norder by po.name desc",
"ref_doctype": "Purchase Order",
"report_name": "Item-wise Purchase History",
- "report_type": "Query Report"
+ "report_type": "Query Report",
+ "roles": [
+ {
+ "role": "Stock User"
+ },
+ {
+ "role": "Purchase Manager"
+ },
+ {
+ "role": "Purchase User"
+ }
+ ]
}
\ No newline at end of file
diff --git a/erpnext/buying/report/purchase_order_trends/purchase_order_trends.json b/erpnext/buying/report/purchase_order_trends/purchase_order_trends.json
index c91bae3..aabb5b6 100644
--- a/erpnext/buying/report/purchase_order_trends/purchase_order_trends.json
+++ b/erpnext/buying/report/purchase_order_trends/purchase_order_trends.json
@@ -1,16 +1,29 @@
{
+ "add_total_row": 0,
"apply_user_permissions": 1,
"creation": "2013-06-13 18:45:01",
+ "disabled": 0,
"docstatus": 0,
"doctype": "Report",
- "idx": 1,
+ "idx": 3,
"is_standard": "Yes",
- "modified": "2014-06-03 07:18:17.255067",
+ "modified": "2017-02-24 20:16:13.121638",
"modified_by": "Administrator",
"module": "Buying",
"name": "Purchase Order Trends",
"owner": "Administrator",
"ref_doctype": "Purchase Order",
"report_name": "Purchase Order Trends",
- "report_type": "Script Report"
+ "report_type": "Script Report",
+ "roles": [
+ {
+ "role": "Stock User"
+ },
+ {
+ "role": "Purchase Manager"
+ },
+ {
+ "role": "Purchase User"
+ }
+ ]
}
\ No newline at end of file
diff --git a/erpnext/buying/report/quoted_item_comparison/quoted_item_comparison.json b/erpnext/buying/report/quoted_item_comparison/quoted_item_comparison.json
index 00e89f0..23b3ace 100644
--- a/erpnext/buying/report/quoted_item_comparison/quoted_item_comparison.json
+++ b/erpnext/buying/report/quoted_item_comparison/quoted_item_comparison.json
@@ -5,14 +5,28 @@
"disabled": 0,
"docstatus": 0,
"doctype": "Report",
- "idx": 0,
+ "idx": 2,
"is_standard": "Yes",
- "modified": "2016-07-21 12:32:45.733155",
+ "modified": "2017-02-24 20:04:58.784351",
"modified_by": "Administrator",
"module": "Buying",
"name": "Quoted Item Comparison",
"owner": "Administrator",
"ref_doctype": "Supplier Quotation",
"report_name": "Quoted Item Comparison",
- "report_type": "Script Report"
+ "report_type": "Script Report",
+ "roles": [
+ {
+ "role": "Manufacturing Manager"
+ },
+ {
+ "role": "Purchase Manager"
+ },
+ {
+ "role": "Purchase User"
+ },
+ {
+ "role": "Stock User"
+ }
+ ]
}
\ No newline at end of file
diff --git a/erpnext/buying/report/requested_items_to_be_ordered/requested_items_to_be_ordered.json b/erpnext/buying/report/requested_items_to_be_ordered/requested_items_to_be_ordered.json
index 62f7691..f351f3b 100644
--- a/erpnext/buying/report/requested_items_to_be_ordered/requested_items_to_be_ordered.json
+++ b/erpnext/buying/report/requested_items_to_be_ordered/requested_items_to_be_ordered.json
@@ -2,11 +2,12 @@
"add_total_row": 1,
"apply_user_permissions": 1,
"creation": "2013-05-13 16:10:02",
+ "disabled": 0,
"docstatus": 0,
"doctype": "Report",
- "idx": 1,
+ "idx": 3,
"is_standard": "Yes",
- "modified": "2015-03-30 05:41:52.889977",
+ "modified": "2017-02-24 20:10:53.005589",
"modified_by": "Administrator",
"module": "Buying",
"name": "Requested Items To Be Ordered",
@@ -14,5 +15,16 @@
"query": "select \n mr.name as \"Material Request:Link/Material Request:120\",\n\tmr.transaction_date as \"Date:Date:100\",\n\tmr_item.item_code as \"Item Code:Link/Item:120\",\n\tsum(ifnull(mr_item.qty, 0)) as \"Qty:Float:100\",\n\tsum(ifnull(mr_item.ordered_qty, 0)) as \"Ordered Qty:Float:100\", \n\t(sum(mr_item.qty) - sum(ifnull(mr_item.ordered_qty, 0))) as \"Qty to Order:Float:100\",\n\tmr_item.item_name as \"Item Name::150\",\n\tmr_item.description as \"Description::200\",\n\tmr.company as \"Company:Link/Company:\"\nfrom\n\t`tabMaterial Request` mr, `tabMaterial Request Item` mr_item\nwhere\n\tmr_item.parent = mr.name\n\tand mr.material_request_type = \"Purchase\"\n\tand mr.docstatus = 1\n\tand mr.status != \"Stopped\"\ngroup by mr.name, mr_item.item_code\nhaving\n\tsum(ifnull(mr_item.ordered_qty, 0)) < sum(ifnull(mr_item.qty, 0))\norder by mr.transaction_date asc",
"ref_doctype": "Purchase Order",
"report_name": "Requested Items To Be Ordered",
- "report_type": "Query Report"
+ "report_type": "Query Report",
+ "roles": [
+ {
+ "role": "Stock User"
+ },
+ {
+ "role": "Purchase Manager"
+ },
+ {
+ "role": "Purchase User"
+ }
+ ]
}
\ No newline at end of file
diff --git a/erpnext/crm/report/minutes_to_first_response_for_opportunity/minutes_to_first_response_for_opportunity.json b/erpnext/crm/report/minutes_to_first_response_for_opportunity/minutes_to_first_response_for_opportunity.json
index a366b3e..bcd092b 100644
--- a/erpnext/crm/report/minutes_to_first_response_for_opportunity/minutes_to_first_response_for_opportunity.json
+++ b/erpnext/crm/report/minutes_to_first_response_for_opportunity/minutes_to_first_response_for_opportunity.json
@@ -5,14 +5,22 @@
"disabled": 0,
"docstatus": 0,
"doctype": "Report",
- "idx": 0,
+ "idx": 2,
"is_standard": "Yes",
- "modified": "2016-06-17 11:28:25.867258",
+ "modified": "2017-02-24 20:06:08.801109",
"modified_by": "Administrator",
"module": "CRM",
"name": "Minutes to First Response for Opportunity",
"owner": "Administrator",
"ref_doctype": "Opportunity",
"report_name": "Minutes to First Response for Opportunity",
- "report_type": "Script Report"
+ "report_type": "Script Report",
+ "roles": [
+ {
+ "role": "Sales User"
+ },
+ {
+ "role": "Sales Manager"
+ }
+ ]
}
\ No newline at end of file
diff --git a/erpnext/hr/doctype/employee/employee.py b/erpnext/hr/doctype/employee/employee.py
index afa21e0..13aa524 100755
--- a/erpnext/hr/doctype/employee/employee.py
+++ b/erpnext/hr/doctype/employee/employee.py
@@ -66,7 +66,7 @@
user = frappe.get_doc("User", self.user_id)
user.flags.ignore_permissions = True
- if "Employee" not in user.get("user_roles"):
+ if "Employee" not in user.get("roles"):
user.add_roles("Employee")
# copy details like Fullname, DOB and Image to User
@@ -186,14 +186,14 @@
def validate_employee_role(doc, method):
# called via User hook
- if "Employee" in [d.role for d in doc.get("user_roles")]:
+ if "Employee" in [d.role for d in doc.get("roles")]:
if not frappe.db.get_value("Employee", {"user_id": doc.name}):
frappe.msgprint(_("Please set User ID field in an Employee record to set Employee Role"))
- doc.get("user_roles").remove(doc.get("user_roles", {"role": "Employee"})[0])
+ doc.get("roles").remove(doc.get("roles", {"role": "Employee"})[0])
def update_user_permissions(doc, method):
# called via User hook
- if "Employee" in [d.role for d in doc.get("user_roles")]:
+ if "Employee" in [d.role for d in doc.get("roles")]:
employee = frappe.get_doc("Employee", {"user_id": doc.name})
employee.update_user_permissions()
diff --git a/erpnext/hr/doctype/employee_leave_approver/employee_leave_approver.py b/erpnext/hr/doctype/employee_leave_approver/employee_leave_approver.py
index fb58d75..04e2692 100755
--- a/erpnext/hr/doctype/employee_leave_approver/employee_leave_approver.py
+++ b/erpnext/hr/doctype/employee_leave_approver/employee_leave_approver.py
@@ -17,7 +17,7 @@
def get_approver_list(name):
return frappe.db.sql("""select user.name, user.first_name, user.last_name from
- tabUser user, tabUserRole user_role where
+ tabUser user, `tabHas Role` user_role where
user_role.role = "Leave Approver"
and user_role.parent = user.name and
user.name != %s
diff --git a/erpnext/hr/doctype/expense_claim/expense_claim.js b/erpnext/hr/doctype/expense_claim/expense_claim.js
index 7d19051..4961208 100644
--- a/erpnext/hr/doctype/expense_claim/expense_claim.js
+++ b/erpnext/hr/doctype/expense_claim/expense_claim.js
@@ -107,7 +107,7 @@
cur_frm.cscript.set_help = function(doc) {
cur_frm.set_intro("");
- if(doc.__islocal && !in_list(user_roles, "HR User")) {
+ if(doc.__islocal && !in_list(roles, "HR User")) {
cur_frm.set_intro(__("Fill the form and save it"))
} else {
if(doc.docstatus==0 && doc.approval_status=="Draft") {
diff --git a/erpnext/hr/doctype/expense_claim/expense_claim.py b/erpnext/hr/doctype/expense_claim/expense_claim.py
index 957753a..01dc341 100644
--- a/erpnext/hr/doctype/expense_claim/expense_claim.py
+++ b/erpnext/hr/doctype/expense_claim/expense_claim.py
@@ -194,7 +194,7 @@
def get_expense_approver(doctype, txt, searchfield, start, page_len, filters):
return frappe.db.sql("""
select u.name, concat(u.first_name, ' ', u.last_name)
- from tabUser u, tabUserRole r
+ from tabUser u, `tabHas Role` r
where u.name = r.parent and r.role = 'Expense Approver'
and u.enabled = 1 and u.name like %s
""", ("%" + txt + "%"))
diff --git a/erpnext/hr/doctype/leave_application/leave_application.py b/erpnext/hr/doctype/leave_application/leave_application.py
index c53c230..2a282e1 100755
--- a/erpnext/hr/doctype/leave_application/leave_application.py
+++ b/erpnext/hr/doctype/leave_application/leave_application.py
@@ -215,7 +215,7 @@
frappe.throw(_("Leave approver must be one of {0}")
.format(comma_or(leave_approvers)), InvalidLeaveApproverError)
- elif self.leave_approver and not frappe.db.sql("""select name from `tabUserRole`
+ elif self.leave_approver and not frappe.db.sql("""select name from `tabHas Role`
where parent=%s and role='Leave Approver'""", self.leave_approver):
frappe.throw(_("{0} ({1}) must have role 'Leave Approver'")\
.format(get_fullname(self.leave_approver), self.leave_approver), InvalidLeaveApproverError)
diff --git a/erpnext/hr/doctype/leave_application/test_leave_application.py b/erpnext/hr/doctype/leave_application/test_leave_application.py
index f7a996b..0ec3efb 100644
--- a/erpnext/hr/doctype/leave_application/test_leave_application.py
+++ b/erpnext/hr/doctype/leave_application/test_leave_application.py
@@ -53,7 +53,7 @@
frappe.db.sql("""delete from `tabEmployee Leave Approver`""")
def _clear_roles(self):
- frappe.db.sql("""delete from `tabUserRole` where parent in
+ frappe.db.sql("""delete from `tabHas Role` where parent in
("test@example.com", "test1@example.com", "test2@example.com")""")
def _clear_applications(self):
diff --git a/erpnext/hr/doctype/salary_slip/test_salary_slip.py b/erpnext/hr/doctype/salary_slip/test_salary_slip.py
index ce20396..f136cb5 100644
--- a/erpnext/hr/doctype/salary_slip/test_salary_slip.py
+++ b/erpnext/hr/doctype/salary_slip/test_salary_slip.py
@@ -176,7 +176,7 @@
"email": user,
"first_name": user,
"new_password": "password",
- "user_roles": [{"doctype": "UserRole", "role": "Employee"}]
+ "roles": [{"doctype": "Has Role", "role": "Employee"}]
}).insert()
if not frappe.db.get_value("Employee", {"user_id": user}):
diff --git a/erpnext/hr/doctype/salary_structure/test_salary_structure.py b/erpnext/hr/doctype/salary_structure/test_salary_structure.py
index 7270ab7..3abdaf3 100644
--- a/erpnext/hr/doctype/salary_structure/test_salary_structure.py
+++ b/erpnext/hr/doctype/salary_structure/test_salary_structure.py
@@ -52,7 +52,7 @@
"email": user,
"first_name": user,
"new_password": "password",
- "user_roles": [{"doctype": "UserRole", "role": "Employee"}]
+ "roles": [{"doctype": "Has Role", "role": "Employee"}]
}).insert()
diff --git a/erpnext/hr/report/employee_birthday/employee_birthday.json b/erpnext/hr/report/employee_birthday/employee_birthday.json
index 703388f..7946a6a 100644
--- a/erpnext/hr/report/employee_birthday/employee_birthday.json
+++ b/erpnext/hr/report/employee_birthday/employee_birthday.json
@@ -1,16 +1,29 @@
{
+ "add_total_row": 0,
"apply_user_permissions": 1,
"creation": "2013-05-06 17:56:03",
+ "disabled": 0,
"docstatus": 0,
"doctype": "Report",
- "idx": 1,
+ "idx": 3,
"is_standard": "Yes",
- "modified": "2014-06-03 07:18:17.045541",
+ "modified": "2017-02-24 20:18:13.011024",
"modified_by": "Administrator",
"module": "HR",
"name": "Employee Birthday",
"owner": "Administrator",
"ref_doctype": "Employee",
"report_name": "Employee Birthday",
- "report_type": "Script Report"
+ "report_type": "Script Report",
+ "roles": [
+ {
+ "role": "Employee"
+ },
+ {
+ "role": "HR User"
+ },
+ {
+ "role": "HR Manager"
+ }
+ ]
}
\ No newline at end of file
diff --git a/erpnext/hr/report/employee_information/employee_information.json b/erpnext/hr/report/employee_information/employee_information.json
index 51963d4..ee68af3 100644
--- a/erpnext/hr/report/employee_information/employee_information.json
+++ b/erpnext/hr/report/employee_information/employee_information.json
@@ -5,15 +5,23 @@
"disabled": 0,
"docstatus": 0,
"doctype": "Report",
- "idx": 1,
+ "idx": 3,
"is_standard": "Yes",
"json": "{\"add_total_row\": 0, \"sort_by\": \"Employee.bank_ac_no\", \"sort_order\": \"desc\", \"sort_by_next\": \"\", \"filters\": [], \"sort_order_next\": \"desc\", \"columns\": [[\"name\", \"Employee\"], [\"employee_number\", \"Employee\"], [\"date_of_joining\", \"Employee\"], [\"branch\", \"Employee\"], [\"department\", \"Employee\"], [\"designation\", \"Employee\"], [\"gender\", \"Employee\"], [\"status\", \"Employee\"], [\"company\", \"Employee\"], [\"employment_type\", \"Employee\"], [\"reports_to\", \"Employee\"], [\"company_email\", \"Employee\"]]}",
- "modified": "2016-12-05 18:49:34.782552",
+ "modified": "2017-02-24 20:01:38.681441",
"modified_by": "Administrator",
"module": "HR",
"name": "Employee Information",
"owner": "Administrator",
"ref_doctype": "Employee",
"report_name": "Employee Information",
- "report_type": "Report Builder"
+ "report_type": "Report Builder",
+ "roles": [
+ {
+ "role": "HR User"
+ },
+ {
+ "role": "HR Manager"
+ }
+ ]
}
\ No newline at end of file
diff --git a/erpnext/hr/report/employee_leave_balance/employee_leave_balance.json b/erpnext/hr/report/employee_leave_balance/employee_leave_balance.json
index d83afc2..8b47f7e 100644
--- a/erpnext/hr/report/employee_leave_balance/employee_leave_balance.json
+++ b/erpnext/hr/report/employee_leave_balance/employee_leave_balance.json
@@ -1,16 +1,26 @@
{
+ "add_total_row": 0,
"apply_user_permissions": 1,
"creation": "2013-02-22 15:29:34",
+ "disabled": 0,
"docstatus": 0,
"doctype": "Report",
- "idx": 1,
+ "idx": 3,
"is_standard": "Yes",
- "modified": "2014-06-03 07:18:17.066168",
+ "modified": "2017-02-24 20:18:04.317397",
"modified_by": "Administrator",
"module": "HR",
"name": "Employee Leave Balance",
"owner": "Administrator",
"ref_doctype": "Employee",
"report_name": "Employee Leave Balance",
- "report_type": "Script Report"
+ "report_type": "Script Report",
+ "roles": [
+ {
+ "role": "HR User"
+ },
+ {
+ "role": "HR Manager"
+ }
+ ]
}
\ No newline at end of file
diff --git a/erpnext/hr/report/employees_working_on_a_holiday/employees_working_on_a_holiday.json b/erpnext/hr/report/employees_working_on_a_holiday/employees_working_on_a_holiday.json
index a379fd2..6c9f7ff 100644
--- a/erpnext/hr/report/employees_working_on_a_holiday/employees_working_on_a_holiday.json
+++ b/erpnext/hr/report/employees_working_on_a_holiday/employees_working_on_a_holiday.json
@@ -5,14 +5,25 @@
"disabled": 0,
"docstatus": 0,
"doctype": "Report",
- "idx": 0,
+ "idx": 2,
"is_standard": "Yes",
- "modified": "2016-07-14 12:03:56.967739",
+ "modified": "2017-02-24 20:05:17.833885",
"modified_by": "Administrator",
"module": "HR",
"name": "Employees working on a holiday",
"owner": "Administrator",
"ref_doctype": "Attendance",
"report_name": "Employees working on a holiday",
- "report_type": "Script Report"
+ "report_type": "Script Report",
+ "roles": [
+ {
+ "role": "System Manager"
+ },
+ {
+ "role": "HR User"
+ },
+ {
+ "role": "HR Manager"
+ }
+ ]
}
\ No newline at end of file
diff --git a/erpnext/hr/report/monthly_attendance_sheet/monthly_attendance_sheet.json b/erpnext/hr/report/monthly_attendance_sheet/monthly_attendance_sheet.json
index 7d13381..4daab81 100644
--- a/erpnext/hr/report/monthly_attendance_sheet/monthly_attendance_sheet.json
+++ b/erpnext/hr/report/monthly_attendance_sheet/monthly_attendance_sheet.json
@@ -2,16 +2,28 @@
"add_total_row": 0,
"apply_user_permissions": 1,
"creation": "2013-05-13 14:04:03",
+ "disabled": 0,
"docstatus": 0,
"doctype": "Report",
- "idx": 1,
+ "idx": 3,
"is_standard": "Yes",
- "modified": "2014-06-03 07:18:17.181332",
+ "modified": "2017-02-24 20:16:50.550242",
"modified_by": "Administrator",
"module": "HR",
"name": "Monthly Attendance Sheet",
"owner": "Administrator",
"ref_doctype": "Attendance",
"report_name": "Monthly Attendance Sheet",
- "report_type": "Script Report"
+ "report_type": "Script Report",
+ "roles": [
+ {
+ "role": "System Manager"
+ },
+ {
+ "role": "HR User"
+ },
+ {
+ "role": "HR Manager"
+ }
+ ]
}
\ No newline at end of file
diff --git a/erpnext/hr/report/salary_register/salary_register.json b/erpnext/hr/report/salary_register/salary_register.json
index 1166915..89a7ba2 100644
--- a/erpnext/hr/report/salary_register/salary_register.json
+++ b/erpnext/hr/report/salary_register/salary_register.json
@@ -5,14 +5,22 @@
"disabled": 0,
"docstatus": 0,
"doctype": "Report",
- "idx": 0,
+ "idx": 2,
"is_standard": "Yes",
- "modified": "2017-01-10 17:38:00.832224",
+ "modified": "2017-02-24 19:58:33.143974",
"modified_by": "Administrator",
"module": "HR",
"name": "Salary Register",
"owner": "Administrator",
"ref_doctype": "Salary Slip",
"report_name": "Salary Register",
- "report_type": "Script Report"
+ "report_type": "Script Report",
+ "roles": [
+ {
+ "role": "HR User"
+ },
+ {
+ "role": "HR Manager"
+ }
+ ]
}
\ No newline at end of file
diff --git a/erpnext/hr/report/vehicle_expenses/vehicle_expenses.json b/erpnext/hr/report/vehicle_expenses/vehicle_expenses.json
index f151c67..2ab0c14 100644
--- a/erpnext/hr/report/vehicle_expenses/vehicle_expenses.json
+++ b/erpnext/hr/report/vehicle_expenses/vehicle_expenses.json
@@ -5,14 +5,19 @@
"disabled": 0,
"docstatus": 0,
"doctype": "Report",
- "idx": 0,
+ "idx": 2,
"is_standard": "Yes",
- "modified": "2017-01-09 11:18:31.959124",
+ "modified": "2017-02-24 19:59:18.641284",
"modified_by": "Administrator",
"module": "HR",
"name": "Vehicle Expenses",
"owner": "Administrator",
"ref_doctype": "Vehicle",
"report_name": "Vehicle Expenses",
- "report_type": "Script Report"
+ "report_type": "Script Report",
+ "roles": [
+ {
+ "role": "Fleet Manager"
+ }
+ ]
}
\ No newline at end of file
diff --git a/erpnext/manufacturing/report/bom_stock_report/bom_stock_report.json b/erpnext/manufacturing/report/bom_stock_report/bom_stock_report.json
index 64d0ebb..f2090b7 100644
--- a/erpnext/manufacturing/report/bom_stock_report/bom_stock_report.json
+++ b/erpnext/manufacturing/report/bom_stock_report/bom_stock_report.json
@@ -7,8 +7,8 @@
"doctype": "Report",
"idx": 0,
"is_standard": "Yes",
- "letter_head": "Standard",
- "modified": "2017-02-09 23:19:32.050905",
+ "letter_head": "",
+ "modified": "2017-02-24 19:56:30.215599",
"modified_by": "Administrator",
"module": "Manufacturing",
"name": "BOM Stock Report",
@@ -16,5 +16,13 @@
"query": "SELECT \n\tbom_item.item_code as \"Item:Link/Item:200\",\n\tbom_item.description as \"Description:Data:300\",\n\tbom_item.qty as \"Required Qty:Float:100\",\n\tledger.actual_qty as \"In Stock Qty:Float:100\",\n\tFLOOR(ledger.actual_qty /bom_item.qty) as \"Enough Parts to Build:Int:100\"\nFROM\n\t`tabBOM Item` AS bom_item \n\tLEFT JOIN `tabBin` AS ledger\t\n\t\tON bom_item.item_code = ledger.item_code \n\t\tAND ledger.warehouse = %(warehouse)s\nWHERE\n\tbom_item.parent=%(bom)s\n\nGROUP BY bom_item.item_code",
"ref_doctype": "BOM",
"report_name": "BOM Stock Report",
- "report_type": "Query Report"
+ "report_type": "Query Report",
+ "roles": [
+ {
+ "role": "Manufacturing Manager"
+ },
+ {
+ "role": "Manufacturing User"
+ }
+ ]
}
\ No newline at end of file
diff --git a/erpnext/manufacturing/report/completed_production_orders/completed_production_orders.json b/erpnext/manufacturing/report/completed_production_orders/completed_production_orders.json
index 6e383a1..d36e52e 100644
--- a/erpnext/manufacturing/report/completed_production_orders/completed_production_orders.json
+++ b/erpnext/manufacturing/report/completed_production_orders/completed_production_orders.json
@@ -1,11 +1,13 @@
{
+ "add_total_row": 0,
"apply_user_permissions": 1,
"creation": "2013-08-12 12:44:27",
+ "disabled": 0,
"docstatus": 0,
"doctype": "Report",
- "idx": 1,
+ "idx": 3,
"is_standard": "Yes",
- "modified": "2015-05-15 05:42:42.742398",
+ "modified": "2017-02-24 20:10:32.460097",
"modified_by": "Administrator",
"module": "Manufacturing",
"name": "Completed Production Orders",
@@ -13,5 +15,13 @@
"query": "SELECT\n `tabProduction Order`.name as \"Production Order:Link/Production Order:200\",\n `tabProduction Order`.creation as \"Date:Date:120\",\n `tabProduction Order`.production_item as \"Item:Link/Item:150\",\n `tabProduction Order`.qty as \"To Produce:Int:100\",\n `tabProduction Order`.produced_qty as \"Produced:Int:100\",\n `tabProduction Order`.company as \"Company:Link/Company:\"\nFROM\n `tabProduction Order`\nWHERE\n `tabProduction Order`.docstatus=1\n AND ifnull(`tabProduction Order`.produced_qty,0) = `tabProduction Order`.qty",
"ref_doctype": "Production Order",
"report_name": "Completed Production Orders",
- "report_type": "Query Report"
+ "report_type": "Query Report",
+ "roles": [
+ {
+ "role": "Manufacturing User"
+ },
+ {
+ "role": "Stock User"
+ }
+ ]
}
\ No newline at end of file
diff --git a/erpnext/manufacturing/report/issued_items_against_production_order/issued_items_against_production_order.json b/erpnext/manufacturing/report/issued_items_against_production_order/issued_items_against_production_order.json
index 0f69eb2..388ab8c 100644
--- a/erpnext/manufacturing/report/issued_items_against_production_order/issued_items_against_production_order.json
+++ b/erpnext/manufacturing/report/issued_items_against_production_order/issued_items_against_production_order.json
@@ -5,9 +5,9 @@
"disabled": 0,
"docstatus": 0,
"doctype": "Report",
- "idx": 1,
+ "idx": 3,
"is_standard": "Yes",
- "modified": "2016-12-14 07:02:23.570939",
+ "modified": "2017-02-24 20:00:38.101588",
"modified_by": "Administrator",
"module": "Manufacturing",
"name": "Issued Items Against Production Order",
@@ -15,5 +15,13 @@
"query": "select\n ste.production_order as \"Production Order:Link/Production Order:120\",\n ste.posting_date as \"Issue Date:Date:140\",\n ste_item.item_code as \"Item Code:Link/Item:120\",\n\tste_item.description as \"Description::150\",\n\tste_item.transfer_qty as \"Qty:Float:100\",\n\tste_item.stock_uom as \"UOM:Link/UOM:80\",\n\tste_item.amount as \"Amount:Currency:120\",\n\tste_item.serial_no as \"Serial No:Link/Serial No:80\",\n\tste_item.s_warehouse as \"Source Warehouse:Link/Warehouse:120\",\n\tste_item.t_warehouse as \"Target Warehouse:Link/Warehouse:120\",\n\tpro.production_item as \"Finished Goods:Link/Item:120\", \n\tste.name as \"Stock Entry:Link/Stock Entry:120\",\n\tste.company as \"Company:Link/Company:\",\n\t(select bin.projected_qty from `tabBin` bin \n\t\t\twhere bin.item_code= ste_item.item_code and bin.warehouse= ste_item.s_warehouse) as \"Projected Quantity as Source:Float:200\"\nfrom\t`tabStock Entry` ste, `tabStock Entry Detail` ste_item, `tabProduction Order` pro\nwhere\n\tifnull(ste.production_order, '') != '' and ste.name = ste_item.parent \n\tand ste.production_order = pro.name and ste.docstatus = 1\n\tand ste.purpose = 'Material Transfer for Manufacture'\norder by ste.posting_date, ste.production_order, ste_item.item_code",
"ref_doctype": "Production Order",
"report_name": "Issued Items Against Production Order",
- "report_type": "Query Report"
+ "report_type": "Query Report",
+ "roles": [
+ {
+ "role": "Manufacturing User"
+ },
+ {
+ "role": "Stock User"
+ }
+ ]
}
\ No newline at end of file
diff --git a/erpnext/manufacturing/report/open_production_orders/open_production_orders.json b/erpnext/manufacturing/report/open_production_orders/open_production_orders.json
index d40b8ad..5d0b711 100644
--- a/erpnext/manufacturing/report/open_production_orders/open_production_orders.json
+++ b/erpnext/manufacturing/report/open_production_orders/open_production_orders.json
@@ -1,11 +1,13 @@
{
+ "add_total_row": 0,
"apply_user_permissions": 1,
"creation": "2013-08-12 12:32:30",
+ "disabled": 0,
"docstatus": 0,
"doctype": "Report",
- "idx": 1,
+ "idx": 3,
"is_standard": "Yes",
- "modified": "2015-05-15 05:43:59.976254",
+ "modified": "2017-02-24 20:10:23.179130",
"modified_by": "Administrator",
"module": "Manufacturing",
"name": "Open Production Orders",
@@ -13,5 +15,13 @@
"query": "SELECT\n `tabProduction Order`.name as \"Production Order:Link/Production Order:200\",\n `tabProduction Order`.creation as \"Date:Date:120\",\n `tabProduction Order`.production_item as \"Item:Link/Item:150\",\n `tabProduction Order`.qty as \"To Produce:Int:100\",\n `tabProduction Order`.produced_qty as \"Produced:Int:100\",\n `tabProduction Order`.company as \"Company:Link/Company:\"\nFROM\n `tabProduction Order`\nWHERE\n `tabProduction Order`.docstatus=1\n AND ifnull(`tabProduction Order`.produced_qty,0) < `tabProduction Order`.qty\n AND NOT EXISTS (SELECT name from `tabStock Entry` where production_order =`tabProduction Order`.name) ",
"ref_doctype": "Production Order",
"report_name": "Open Production Orders",
- "report_type": "Query Report"
+ "report_type": "Query Report",
+ "roles": [
+ {
+ "role": "Manufacturing User"
+ },
+ {
+ "role": "Stock User"
+ }
+ ]
}
\ No newline at end of file
diff --git a/erpnext/manufacturing/report/production_order_stock_report/production_order_stock_report.json b/erpnext/manufacturing/report/production_order_stock_report/production_order_stock_report.json
index 1b1357e..0cb8982 100644
--- a/erpnext/manufacturing/report/production_order_stock_report/production_order_stock_report.json
+++ b/erpnext/manufacturing/report/production_order_stock_report/production_order_stock_report.json
@@ -7,13 +7,21 @@
"doctype": "Report",
"idx": 0,
"is_standard": "Yes",
- "letter_head": "Standard",
- "modified": "2017-01-10 14:01:43.905861",
+ "letter_head": "",
+ "modified": "2017-02-24 19:59:07.792058",
"modified_by": "Administrator",
"module": "Manufacturing",
"name": "Production Order Stock Report",
"owner": "Administrator",
"ref_doctype": "Production Order",
"report_name": "Production Order Stock Report",
- "report_type": "Script Report"
+ "report_type": "Script Report",
+ "roles": [
+ {
+ "role": "Manufacturing User"
+ },
+ {
+ "role": "Stock User"
+ }
+ ]
}
\ No newline at end of file
diff --git a/erpnext/manufacturing/report/production_orders_in_progress/production_orders_in_progress.json b/erpnext/manufacturing/report/production_orders_in_progress/production_orders_in_progress.json
index f9f283f..5867aed 100644
--- a/erpnext/manufacturing/report/production_orders_in_progress/production_orders_in_progress.json
+++ b/erpnext/manufacturing/report/production_orders_in_progress/production_orders_in_progress.json
@@ -1,11 +1,13 @@
{
+ "add_total_row": 0,
"apply_user_permissions": 1,
"creation": "2013-08-12 12:43:47",
+ "disabled": 0,
"docstatus": 0,
"doctype": "Report",
- "idx": 1,
+ "idx": 3,
"is_standard": "Yes",
- "modified": "2015-03-30 05:44:32.894553",
+ "modified": "2017-02-24 20:10:40.304828",
"modified_by": "Administrator",
"module": "Manufacturing",
"name": "Production Orders in Progress",
@@ -13,5 +15,13 @@
"query": "SELECT\n `tabProduction Order`.name as \"Production Order:Link/Production Order:200\",\n `tabProduction Order`.creation as \"Date:Date:120\",\n `tabProduction Order`.production_item as \"Item:Link/Item:150\",\n `tabProduction Order`.qty as \"To Produce:Int:100\",\n `tabProduction Order`.produced_qty as \"Produced:Int:100\",\n `tabProduction Order`.company as \"Company:Link/Company:\"\nFROM\n `tabProduction Order`\nWHERE\n `tabProduction Order`.docstatus=1\n AND ifnull(`tabProduction Order`.produced_qty,0) < `tabProduction Order`.qty\n AND EXISTS (SELECT name from `tabStock Entry` where production_order =`tabProduction Order`.name) ",
"ref_doctype": "Production Order",
"report_name": "Production Orders in Progress",
- "report_type": "Query Report"
+ "report_type": "Query Report",
+ "roles": [
+ {
+ "role": "Manufacturing User"
+ },
+ {
+ "role": "Stock User"
+ }
+ ]
}
\ No newline at end of file
diff --git a/erpnext/patches/v4_0/remove_employee_role_if_no_employee.py b/erpnext/patches/v4_0/remove_employee_role_if_no_employee.py
index bed8e2b..8766ace 100644
--- a/erpnext/patches/v4_0/remove_employee_role_if_no_employee.py
+++ b/erpnext/patches/v4_0/remove_employee_role_if_no_employee.py
@@ -6,13 +6,13 @@
import frappe.permissions
def execute():
- for user in frappe.db.sql_list("select distinct parent from `tabUserRole` where role='Employee'"):
+ for user in frappe.db.sql_list("select distinct parent from `tabHas Role` where role='Employee'"):
# if employee record does not exists, remove employee role!
if not frappe.db.get_value("Employee", {"user_id": user}):
try:
user = frappe.get_doc("User", user)
- for role in user.get("user_roles", {"role": "Employee"}):
- user.get("user_roles").remove(role)
+ for role in user.get("roles", {"role": "Employee"}):
+ user.get("roles").remove(role)
user.save()
except frappe.DoesNotExistError:
pass
diff --git a/erpnext/patches/v5_0/newsletter.py b/erpnext/patches/v5_0/newsletter.py
index c03664b..fcf95ca 100644
--- a/erpnext/patches/v5_0/newsletter.py
+++ b/erpnext/patches/v5_0/newsletter.py
@@ -19,11 +19,11 @@
if not frappe.db.exists("Role", "Newsletter Manager"):
frappe.get_doc({"doctype": "Role", "role": "Newsletter Manager"}).insert()
- for userrole in frappe.get_all("UserRole", "parent", {"role": "Sales Manager"}):
+ for userrole in frappe.get_all("Has Role", "parent", {"role": "Sales Manager", "parenttype": "User"}):
if frappe.db.exists("User", userrole.parent):
user = frappe.get_doc("User", userrole.parent)
- user.append("user_roles", {
- "doctype": "UserRole",
+ user.append("roles", {
+ "doctype": "Has Role",
"role": "Newsletter Manager"
})
user.flags.ignore_mandatory = True
diff --git a/erpnext/patches/v6_20x/remove_customer_supplier_roles.py b/erpnext/patches/v6_20x/remove_customer_supplier_roles.py
index eb69845..a651576 100644
--- a/erpnext/patches/v6_20x/remove_customer_supplier_roles.py
+++ b/erpnext/patches/v6_20x/remove_customer_supplier_roles.py
@@ -8,10 +8,10 @@
frappe.reload_doc("projects", "doctype", "timesheet")
for role in ('Customer', 'Supplier'):
- frappe.db.sql('''delete from `tabUserRole`
+ frappe.db.sql('''delete from `tabHas Role`
where role=%s and parent in ("Administrator", "Guest")''', role)
- if not frappe.db.sql('select name from `tabUserRole` where role=%s', role):
+ if not frappe.db.sql('select name from `tabHas Role` where role=%s', role):
# delete DocPerm
for doctype in frappe.db.sql('select parent from tabDocPerm where role=%s', role):
diff --git a/erpnext/projects/report/daily_timesheet_summary/daily_timesheet_summary.json b/erpnext/projects/report/daily_timesheet_summary/daily_timesheet_summary.json
index be5f139..4959d02 100644
--- a/erpnext/projects/report/daily_timesheet_summary/daily_timesheet_summary.json
+++ b/erpnext/projects/report/daily_timesheet_summary/daily_timesheet_summary.json
@@ -5,14 +5,28 @@
"disabled": 0,
"docstatus": 0,
"doctype": "Report",
- "idx": 0,
+ "idx": 2,
"is_standard": "Yes",
- "modified": "2016-07-06 19:31:25.534583",
+ "modified": "2017-02-24 20:05:46.782115",
"modified_by": "Administrator",
"module": "Projects",
"name": "Daily Timesheet Summary",
"owner": "Administrator",
"ref_doctype": "Timesheet",
"report_name": "Daily Timesheet Summary",
- "report_type": "Script Report"
+ "report_type": "Script Report",
+ "roles": [
+ {
+ "role": "Projects User"
+ },
+ {
+ "role": "HR User"
+ },
+ {
+ "role": "Manufacturing User"
+ },
+ {
+ "role": "Accounts User"
+ }
+ ]
}
\ No newline at end of file
diff --git a/erpnext/projects/report/project_wise_stock_tracking/project_wise_stock_tracking.js b/erpnext/projects/report/project_wise_stock_tracking/project_wise_stock_tracking.js
new file mode 100644
index 0000000..ccca264
--- /dev/null
+++ b/erpnext/projects/report/project_wise_stock_tracking/project_wise_stock_tracking.js
@@ -0,0 +1,8 @@
+// Copyright (c) 2016, Frappe Technologies Pvt. Ltd. and contributors
+// For license information, please see license.txt
+
+frappe.query_reports["Project wise Stock Tracking"] = {
+ "filters": [
+
+ ]
+}
diff --git a/erpnext/projects/report/project_wise_stock_tracking/project_wise_stock_tracking.json b/erpnext/projects/report/project_wise_stock_tracking/project_wise_stock_tracking.json
index f6a994d..6acbb63 100644
--- a/erpnext/projects/report/project_wise_stock_tracking/project_wise_stock_tracking.json
+++ b/erpnext/projects/report/project_wise_stock_tracking/project_wise_stock_tracking.json
@@ -1,16 +1,26 @@
{
+ "add_total_row": 0,
"apply_user_permissions": 1,
"creation": "2013-06-03 17:37:41",
+ "disabled": 0,
"docstatus": 0,
"doctype": "Report",
- "idx": 1,
+ "idx": 3,
"is_standard": "Yes",
- "modified": "2016-12-01 09:18:17.229116",
+ "modified": "2017-02-24 20:20:07.593667",
"modified_by": "Administrator",
"module": "Projects",
"name": "Project wise Stock Tracking",
"owner": "Administrator",
"ref_doctype": "Project",
"report_name": "Project wise Stock Tracking ",
- "report_type": "Script Report"
-}
+ "report_type": "Script Report",
+ "roles": [
+ {
+ "role": "Projects User"
+ },
+ {
+ "role": "Projects Manager"
+ }
+ ]
+}
\ No newline at end of file
diff --git a/erpnext/schools/report/absent_student_report/absent_student_report.json b/erpnext/schools/report/absent_student_report/absent_student_report.json
index 5f3ca71..3a2e85f 100644
--- a/erpnext/schools/report/absent_student_report/absent_student_report.json
+++ b/erpnext/schools/report/absent_student_report/absent_student_report.json
@@ -5,14 +5,19 @@
"disabled": 0,
"docstatus": 0,
"doctype": "Report",
- "idx": 1,
+ "idx": 3,
"is_standard": "Yes",
- "modified": "2016-12-01 14:28:27.184668",
+ "modified": "2017-02-24 20:03:01.035036",
"modified_by": "Administrator",
"module": "Schools",
"name": "Absent Student Report",
"owner": "Administrator",
"ref_doctype": "Student Attendance",
"report_name": "Absent Student Report",
- "report_type": "Script Report"
+ "report_type": "Script Report",
+ "roles": [
+ {
+ "role": "Academics User"
+ }
+ ]
}
\ No newline at end of file
diff --git a/erpnext/schools/report/student_batch_wise_attendance/student_batch_wise_attendance.json b/erpnext/schools/report/student_batch_wise_attendance/student_batch_wise_attendance.json
index 8e5e483..7851cbb 100644
--- a/erpnext/schools/report/student_batch_wise_attendance/student_batch_wise_attendance.json
+++ b/erpnext/schools/report/student_batch_wise_attendance/student_batch_wise_attendance.json
@@ -5,14 +5,19 @@
"disabled": 0,
"docstatus": 0,
"doctype": "Report",
- "idx": 0,
+ "idx": 2,
"is_standard": "Yes",
- "modified": "2016-12-01 15:48:50.120579",
+ "modified": "2017-02-24 20:02:33.773899",
"modified_by": "Administrator",
"module": "Schools",
"name": "Student Batch-Wise Attendance",
"owner": "Administrator",
"ref_doctype": "Student Attendance",
"report_name": "Student Batch-Wise Attendance",
- "report_type": "Script Report"
+ "report_type": "Script Report",
+ "roles": [
+ {
+ "role": "Academics User"
+ }
+ ]
}
\ No newline at end of file
diff --git a/erpnext/schools/report/student_fee_collection/student_fee_collection.json b/erpnext/schools/report/student_fee_collection/student_fee_collection.json
index d4afcb9..264638f 100644
--- a/erpnext/schools/report/student_fee_collection/student_fee_collection.json
+++ b/erpnext/schools/report/student_fee_collection/student_fee_collection.json
@@ -5,9 +5,9 @@
"disabled": 0,
"docstatus": 0,
"doctype": "Report",
- "idx": 0,
+ "idx": 2,
"is_standard": "Yes",
- "modified": "2016-07-18 02:58:42.727096",
+ "modified": "2017-02-24 20:05:08.514320",
"modified_by": "Administrator",
"module": "Schools",
"name": "Student Fee Collection",
@@ -15,5 +15,10 @@
"query": "SELECT\n student as \"Student:Link/Student:200\",\n student_name as \"Student Name::200\",\n sum(paid_amount) as \"Paid Amount:Currency:150\",\n sum(outstanding_amount) as \"Outstanding Amount:Currency:150\",\n sum(total_amount) as \"Total Amount:Currency:150\"\nFROM\n `tabFees` \nGROUP BY\n student",
"ref_doctype": "Fees",
"report_name": "Student Fee Collection",
- "report_type": "Query Report"
+ "report_type": "Query Report",
+ "roles": [
+ {
+ "role": "Academics User"
+ }
+ ]
}
\ No newline at end of file
diff --git a/erpnext/schools/report/student_monthly_attendance_sheet/student_monthly_attendance_sheet.json b/erpnext/schools/report/student_monthly_attendance_sheet/student_monthly_attendance_sheet.json
index 1d8f4d0..a6531de 100644
--- a/erpnext/schools/report/student_monthly_attendance_sheet/student_monthly_attendance_sheet.json
+++ b/erpnext/schools/report/student_monthly_attendance_sheet/student_monthly_attendance_sheet.json
@@ -5,14 +5,19 @@
"disabled": 0,
"docstatus": 0,
"doctype": "Report",
- "idx": 1,
+ "idx": 3,
"is_standard": "Yes",
- "modified": "2016-12-01 14:29:53.547378",
+ "modified": "2017-02-24 20:02:41.910358",
"modified_by": "Administrator",
"module": "Schools",
"name": "Student Monthly Attendance Sheet",
"owner": "Administrator",
"ref_doctype": "Student Attendance",
"report_name": "Student Monthly Attendance Sheet",
- "report_type": "Script Report"
+ "report_type": "Script Report",
+ "roles": [
+ {
+ "role": "Academics User"
+ }
+ ]
}
\ No newline at end of file
diff --git a/erpnext/selling/report/available_stock_for_packing_items/available_stock_for_packing_items.js b/erpnext/selling/report/available_stock_for_packing_items/available_stock_for_packing_items.js
new file mode 100644
index 0000000..1e83acd
--- /dev/null
+++ b/erpnext/selling/report/available_stock_for_packing_items/available_stock_for_packing_items.js
@@ -0,0 +1,8 @@
+// Copyright (c) 2016, Frappe Technologies Pvt. Ltd. and contributors
+// For license information, please see license.txt
+
+frappe.query_reports["Available Stock for Packing Items"] = {
+ "filters": [
+
+ ]
+}
diff --git a/erpnext/selling/report/available_stock_for_packing_items/available_stock_for_packing_items.json b/erpnext/selling/report/available_stock_for_packing_items/available_stock_for_packing_items.json
index 52da750..71d1318 100644
--- a/erpnext/selling/report/available_stock_for_packing_items/available_stock_for_packing_items.json
+++ b/erpnext/selling/report/available_stock_for_packing_items/available_stock_for_packing_items.json
@@ -1,16 +1,29 @@
{
+ "add_total_row": 0,
"apply_user_permissions": 1,
"creation": "2013-06-21 13:40:05",
+ "disabled": 0,
"docstatus": 0,
"doctype": "Report",
- "idx": 1,
+ "idx": 3,
"is_standard": "Yes",
- "modified": "2015-07-06 06:11:10.534423",
+ "modified": "2017-02-24 20:09:56.200184",
"modified_by": "Administrator",
"module": "Selling",
"name": "Available Stock for Packing Items",
"owner": "Administrator",
"ref_doctype": "Product Bundle",
"report_name": "Available Stock for Packing Items",
- "report_type": "Script Report"
+ "report_type": "Script Report",
+ "roles": [
+ {
+ "role": "Stock Manager"
+ },
+ {
+ "role": "Stock User"
+ },
+ {
+ "role": "Sales User"
+ }
+ ]
}
\ No newline at end of file
diff --git a/erpnext/selling/report/customer_acquisition_and_loyalty/customer_acquisition_and_loyalty.json b/erpnext/selling/report/customer_acquisition_and_loyalty/customer_acquisition_and_loyalty.json
index 599d0aa..b6a6549 100644
--- a/erpnext/selling/report/customer_acquisition_and_loyalty/customer_acquisition_and_loyalty.json
+++ b/erpnext/selling/report/customer_acquisition_and_loyalty/customer_acquisition_and_loyalty.json
@@ -2,16 +2,40 @@
"add_total_row": 1,
"apply_user_permissions": 1,
"creation": "2013-11-28 14:58:06",
+ "disabled": 0,
"docstatus": 0,
"doctype": "Report",
- "idx": 1,
+ "idx": 3,
"is_standard": "Yes",
- "modified": "2014-06-03 07:18:17.000242",
+ "modified": "2017-02-24 20:18:54.950255",
"modified_by": "Administrator",
"module": "Selling",
"name": "Customer Acquisition and Loyalty",
"owner": "Administrator",
"ref_doctype": "Customer",
"report_name": "Customer Acquisition and Loyalty",
- "report_type": "Script Report"
+ "report_type": "Script Report",
+ "roles": [
+ {
+ "role": "Sales User"
+ },
+ {
+ "role": "Sales Manager"
+ },
+ {
+ "role": "Sales Master Manager"
+ },
+ {
+ "role": "Stock User"
+ },
+ {
+ "role": "Stock Manager"
+ },
+ {
+ "role": "Accounts User"
+ },
+ {
+ "role": "Accounts Manager"
+ }
+ ]
}
\ No newline at end of file
diff --git a/erpnext/selling/report/customer_credit_balance/customer_credit_balance.json b/erpnext/selling/report/customer_credit_balance/customer_credit_balance.json
index 94ea416..4c37ca0 100644
--- a/erpnext/selling/report/customer_credit_balance/customer_credit_balance.json
+++ b/erpnext/selling/report/customer_credit_balance/customer_credit_balance.json
@@ -5,13 +5,37 @@
"disabled": 0,
"docstatus": 0,
"doctype": "Report",
+ "idx": 2,
"is_standard": "Yes",
- "modified": "2014-10-06 15:19:37.578616",
+ "modified": "2017-02-24 20:12:08.631210",
"modified_by": "Administrator",
"module": "Selling",
"name": "Customer Credit Balance",
"owner": "Administrator",
"ref_doctype": "Customer",
"report_name": "Customer Credit Balance",
- "report_type": "Script Report"
+ "report_type": "Script Report",
+ "roles": [
+ {
+ "role": "Sales User"
+ },
+ {
+ "role": "Sales Manager"
+ },
+ {
+ "role": "Sales Master Manager"
+ },
+ {
+ "role": "Stock User"
+ },
+ {
+ "role": "Stock Manager"
+ },
+ {
+ "role": "Accounts User"
+ },
+ {
+ "role": "Accounts Manager"
+ }
+ ]
}
\ No newline at end of file
diff --git a/erpnext/selling/report/inactive_customers/inactive_customers.json b/erpnext/selling/report/inactive_customers/inactive_customers.json
index cfbeb90..85793f7 100644
--- a/erpnext/selling/report/inactive_customers/inactive_customers.json
+++ b/erpnext/selling/report/inactive_customers/inactive_customers.json
@@ -5,14 +5,31 @@
"disabled": 0,
"docstatus": 0,
"doctype": "Report",
- "idx": 0,
+ "idx": 2,
"is_standard": "Yes",
- "modified": "2016-03-08 04:05:02.846556",
+ "modified": "2017-02-24 20:09:10.287960",
"modified_by": "Administrator",
"module": "Selling",
"name": "Inactive Customers",
"owner": "Administrator",
"ref_doctype": "Sales Order",
"report_name": "Inactive Customers",
- "report_type": "Script Report"
+ "report_type": "Script Report",
+ "roles": [
+ {
+ "role": "Sales User"
+ },
+ {
+ "role": "Sales Manager"
+ },
+ {
+ "role": "Maintenance User"
+ },
+ {
+ "role": "Accounts User"
+ },
+ {
+ "role": "Stock User"
+ }
+ ]
}
\ No newline at end of file
diff --git a/erpnext/selling/report/item_wise_sales_history/item_wise_sales_history.json b/erpnext/selling/report/item_wise_sales_history/item_wise_sales_history.json
index bd49d0b..0eb6228 100644
--- a/erpnext/selling/report/item_wise_sales_history/item_wise_sales_history.json
+++ b/erpnext/selling/report/item_wise_sales_history/item_wise_sales_history.json
@@ -5,9 +5,9 @@
"disabled": 0,
"docstatus": 0,
"doctype": "Report",
- "idx": 1,
+ "idx": 3,
"is_standard": "Yes",
- "modified": "2016-04-01 08:26:55.705992",
+ "modified": "2017-02-24 20:08:44.614482",
"modified_by": "Administrator",
"module": "Selling",
"name": "Item-wise Sales History",
@@ -15,5 +15,22 @@
"query": "select\n so_item.item_code as \"Item Code:Link/Item:120\",\n\tso_item.item_name as \"Item Name::120\",\n so_item.item_group as \"Item Group:Link/Item Group:120\",\n\tso_item.description as \"Description::150\",\n\tso_item.qty as \"Qty:Float:100\",\n\tso_item.stock_uom as \"UOM:Link/UOM:80\",\n\tso_item.base_rate as \"Rate:Currency:120\",\n\tso_item.base_amount as \"Amount:Currency:120\",\n\tso.name as \"Sales Order:Link/Sales Order:120\",\n\tso.transaction_date as \"Transaction Date:Date:140\",\n\tso.customer as \"Customer:Link/Customer:130\",\n cu.customer_name as \"Customer Name::150\",\n\tso.territory as \"Territory:Link/Territory:130\",\n so.project as \"Project:Link/Project:130\",\n\tifnull(so_item.delivered_qty, 0) as \"Delivered Qty:Float:120\",\n\tifnull(so_item.billed_amt, 0) as \"Billed Amount:Currency:120\",\n\tso.company as \"Company:Link/Company:\"\nfrom\n\t`tabSales Order` so, `tabSales Order Item` so_item, `tabCustomer` cu\nwhere\n\tso.name = so_item.parent and so.customer=cu.name\n\tand so.docstatus = 1\norder by so.name desc",
"ref_doctype": "Sales Order",
"report_name": "Item-wise Sales History",
- "report_type": "Query Report"
+ "report_type": "Query Report",
+ "roles": [
+ {
+ "role": "Sales User"
+ },
+ {
+ "role": "Sales Manager"
+ },
+ {
+ "role": "Maintenance User"
+ },
+ {
+ "role": "Accounts User"
+ },
+ {
+ "role": "Stock User"
+ }
+ ]
}
\ No newline at end of file
diff --git a/erpnext/selling/report/lead_details/lead_details.json b/erpnext/selling/report/lead_details/lead_details.json
index 047b4b7..432180d 100644
--- a/erpnext/selling/report/lead_details/lead_details.json
+++ b/erpnext/selling/report/lead_details/lead_details.json
@@ -5,9 +5,9 @@
"disabled": 0,
"docstatus": 0,
"doctype": "Report",
- "idx": 1,
+ "idx": 3,
"is_standard": "Yes",
- "modified": "2017-01-19 15:44:59.742195",
+ "modified": "2017-02-24 20:20:28.725080",
"modified_by": "Administrator",
"module": "Selling",
"name": "Lead Details",
@@ -15,5 +15,16 @@
"query": "SELECT\n `tabLead`.name as \"Lead Id:Link/Lead:120\",\n `tabLead`.lead_name as \"Lead Name::120\",\n\t`tabLead`.company_name as \"Company Name::120\",\n\t`tabLead`.status as \"Status::120\",\n\tconcat_ws(', ', \n\t\ttrim(',' from `tabAddress`.address_line1), \n\t\ttrim(',' from tabAddress.address_line2)\n\t) as 'Address::180',\n\t`tabAddress`.state as \"State::100\",\n\t`tabAddress`.pincode as \"Pincode::70\",\n\t`tabAddress`.country as \"Country::100\",\n\t`tabLead`.phone as \"Phone::100\",\n\t`tabLead`.mobile_no as \"Mobile No::100\",\n\t`tabLead`.email_id as \"Email Id::120\",\n\t`tabLead`.lead_owner as \"Lead Owner::120\",\n\t`tabLead`.source as \"Source::120\",\n\t`tabLead`.territory as \"Territory::120\",\n `tabLead`.owner as \"Owner:Link/User:120\"\nFROM\n\t`tabLead`\n\tleft join `tabDynamic Link` on (\n\t\t`tabDynamic Link`.link_name=`tabLead`.name\n\t)\n\tleft join `tabAddress` on (\n\t\t`tabAddress`.name=`tabDynamic Link`.parent\n\t)\nWHERE\n\t`tabLead`.docstatus<2\nORDER BY\n\t`tabLead`.name asc",
"ref_doctype": "Lead",
"report_name": "Lead Details",
- "report_type": "Query Report"
+ "report_type": "Query Report",
+ "roles": [
+ {
+ "role": "Sales User"
+ },
+ {
+ "role": "Sales Manager"
+ },
+ {
+ "role": "System Manager"
+ }
+ ]
}
\ No newline at end of file
diff --git a/erpnext/selling/report/pending_so_items_for_purchase_request/pending_so_items_for_purchase_request.json b/erpnext/selling/report/pending_so_items_for_purchase_request/pending_so_items_for_purchase_request.json
index a0a7505..128544b 100644
--- a/erpnext/selling/report/pending_so_items_for_purchase_request/pending_so_items_for_purchase_request.json
+++ b/erpnext/selling/report/pending_so_items_for_purchase_request/pending_so_items_for_purchase_request.json
@@ -5,9 +5,9 @@
"disabled": 0,
"docstatus": 0,
"doctype": "Report",
- "idx": 1,
+ "idx": 3,
"is_standard": "Yes",
- "modified": "2016-04-12 18:45:49.733159",
+ "modified": "2017-02-24 20:08:11.744036",
"modified_by": "Administrator",
"module": "Selling",
"name": "Pending SO Items For Purchase Request",
@@ -15,5 +15,22 @@
"query": "select so_item.item_code as \"Item Code:Link/Item:120\",\n so_item.item_name as \"Item Name::120\",\n so_item.description as \"Description::120\",\n so.`name` as \"S.O. No.:Link/Sales Order:120\",\n so.`transaction_date` as \"Date:Date:120\",\n mr.name as \"Material Request:Link/Material Request:120\",\n so.customer as \"Customer:Link/Customer:120\",\n so.territory as \"Terretory:Link/Territory:120\",\n sum(so_item.qty) as \"SO Qty:Float:100 \",\n sum(mr_item.qty) as \"Requested Qty:Float:100\",\n sum(so_item.qty) - sum(mr_item.qty) as \"Pending Qty:Float:100 \", \n so.company as \"Company:Link/Company:\"\nfrom\n `tabSales Order` so, `tabSales Order Item` so_item, \n `tabMaterial Request` mr, `tabMaterial Request Item` mr_item\nwhere \n so_item.`parent` = so.`name` \n and mr_item.parent = mr.name\n and mr_item.sales_order = so.name\n and mr_item.item_code = so_item.item_code\n and so.docstatus = 1 and so.status != \"Closed\" \n and mr.docstatus = 1 and mr.status != \"Stopped\"\ngroup by so.name, so_item.item_code\nhaving sum(so_item.qty) > sum(mr_item.qty)\norder by so.name desc, so_item.item_code asc",
"ref_doctype": "Sales Order",
"report_name": "Pending SO Items For Purchase Request",
- "report_type": "Query Report"
+ "report_type": "Query Report",
+ "roles": [
+ {
+ "role": "Sales User"
+ },
+ {
+ "role": "Sales Manager"
+ },
+ {
+ "role": "Maintenance User"
+ },
+ {
+ "role": "Accounts User"
+ },
+ {
+ "role": "Stock User"
+ }
+ ]
}
\ No newline at end of file
diff --git a/erpnext/selling/report/quotation_trends/quotation_trends.json b/erpnext/selling/report/quotation_trends/quotation_trends.json
index 22fac11..0dae26b 100644
--- a/erpnext/selling/report/quotation_trends/quotation_trends.json
+++ b/erpnext/selling/report/quotation_trends/quotation_trends.json
@@ -2,16 +2,31 @@
"add_total_row": 0,
"apply_user_permissions": 1,
"creation": "2013-06-07 16:01:16",
+ "disabled": 0,
"docstatus": 0,
"doctype": "Report",
- "idx": 1,
+ "idx": 3,
"is_standard": "Yes",
- "modified": "2014-06-03 07:18:17.270656",
+ "modified": "2017-02-24 20:15:33.967044",
"modified_by": "Administrator",
"module": "Selling",
"name": "Quotation Trends",
"owner": "Administrator",
"ref_doctype": "Quotation",
"report_name": "Quotation Trends",
- "report_type": "Script Report"
+ "report_type": "Script Report",
+ "roles": [
+ {
+ "role": "Sales User"
+ },
+ {
+ "role": "Sales Manager"
+ },
+ {
+ "role": "Maintenance Manager"
+ },
+ {
+ "role": "Maintenance User"
+ }
+ ]
}
\ No newline at end of file
diff --git a/erpnext/selling/report/sales_order_trends/sales_order_trends.json b/erpnext/selling/report/sales_order_trends/sales_order_trends.json
index bea04a1..1ae8957 100644
--- a/erpnext/selling/report/sales_order_trends/sales_order_trends.json
+++ b/erpnext/selling/report/sales_order_trends/sales_order_trends.json
@@ -1,16 +1,35 @@
{
+ "add_total_row": 0,
"apply_user_permissions": 1,
"creation": "2013-06-13 18:43:30",
+ "disabled": 0,
"docstatus": 0,
"doctype": "Report",
- "idx": 1,
+ "idx": 3,
"is_standard": "Yes",
- "modified": "2014-06-03 07:18:17.296606",
+ "modified": "2017-02-24 20:15:01.634392",
"modified_by": "Administrator",
"module": "Selling",
"name": "Sales Order Trends",
"owner": "Administrator",
"ref_doctype": "Sales Order",
"report_name": "Sales Order Trends",
- "report_type": "Script Report"
+ "report_type": "Script Report",
+ "roles": [
+ {
+ "role": "Sales User"
+ },
+ {
+ "role": "Sales Manager"
+ },
+ {
+ "role": "Maintenance User"
+ },
+ {
+ "role": "Accounts User"
+ },
+ {
+ "role": "Stock User"
+ }
+ ]
}
\ No newline at end of file
diff --git a/erpnext/selling/report/sales_person_target_variance_item_group_wise/sales_person_target_variance_item_group_wise.json b/erpnext/selling/report/sales_person_target_variance_item_group_wise/sales_person_target_variance_item_group_wise.json
index f2127cb..452caf9 100644
--- a/erpnext/selling/report/sales_person_target_variance_item_group_wise/sales_person_target_variance_item_group_wise.json
+++ b/erpnext/selling/report/sales_person_target_variance_item_group_wise/sales_person_target_variance_item_group_wise.json
@@ -1,16 +1,35 @@
{
+ "add_total_row": 0,
"apply_user_permissions": 1,
"creation": "2013-06-21 12:14:15",
+ "disabled": 0,
"docstatus": 0,
"doctype": "Report",
- "idx": 1,
+ "idx": 3,
"is_standard": "Yes",
- "modified": "2014-06-03 07:18:17.307079",
+ "modified": "2017-02-24 20:14:50.589149",
"modified_by": "Administrator",
"module": "Selling",
"name": "Sales Person Target Variance Item Group-Wise",
"owner": "Administrator",
"ref_doctype": "Sales Order",
"report_name": "Sales Person Target Variance Item Group-Wise",
- "report_type": "Script Report"
+ "report_type": "Script Report",
+ "roles": [
+ {
+ "role": "Sales User"
+ },
+ {
+ "role": "Sales Manager"
+ },
+ {
+ "role": "Maintenance User"
+ },
+ {
+ "role": "Accounts User"
+ },
+ {
+ "role": "Stock User"
+ }
+ ]
}
\ No newline at end of file
diff --git a/erpnext/selling/report/sales_person_wise_transaction_summary/sales_person_wise_transaction_summary.json b/erpnext/selling/report/sales_person_wise_transaction_summary/sales_person_wise_transaction_summary.json
index af28e20..589e355 100644
--- a/erpnext/selling/report/sales_person_wise_transaction_summary/sales_person_wise_transaction_summary.json
+++ b/erpnext/selling/report/sales_person_wise_transaction_summary/sales_person_wise_transaction_summary.json
@@ -5,14 +5,31 @@
"disabled": 0,
"docstatus": 0,
"doctype": "Report",
- "idx": 1,
+ "idx": 3,
"is_standard": "Yes",
- "modified": "2016-10-05 12:26:15.736596",
+ "modified": "2017-02-24 20:03:47.710828",
"modified_by": "Administrator",
"module": "Selling",
"name": "Sales Person-wise Transaction Summary",
"owner": "Administrator",
"ref_doctype": "Sales Order",
"report_name": "Sales Person-wise Transaction Summary",
- "report_type": "Script Report"
+ "report_type": "Script Report",
+ "roles": [
+ {
+ "role": "Sales User"
+ },
+ {
+ "role": "Sales Manager"
+ },
+ {
+ "role": "Maintenance User"
+ },
+ {
+ "role": "Accounts User"
+ },
+ {
+ "role": "Stock User"
+ }
+ ]
}
\ No newline at end of file
diff --git a/erpnext/selling/report/territory_target_variance_item_group_wise/territory_target_variance_item_group_wise.json b/erpnext/selling/report/territory_target_variance_item_group_wise/territory_target_variance_item_group_wise.json
index c7b85a3..2cb548f 100644
--- a/erpnext/selling/report/territory_target_variance_item_group_wise/territory_target_variance_item_group_wise.json
+++ b/erpnext/selling/report/territory_target_variance_item_group_wise/territory_target_variance_item_group_wise.json
@@ -1,16 +1,35 @@
{
+ "add_total_row": 0,
"apply_user_permissions": 1,
"creation": "2013-06-21 12:15:00",
+ "disabled": 0,
"docstatus": 0,
"doctype": "Report",
- "idx": 1,
+ "idx": 3,
"is_standard": "Yes",
- "modified": "2014-06-03 07:18:17.369052",
+ "modified": "2017-02-24 20:13:29.705321",
"modified_by": "Administrator",
"module": "Selling",
"name": "Territory Target Variance Item Group-Wise",
"owner": "Administrator",
"ref_doctype": "Sales Order",
"report_name": "Territory Target Variance Item Group-Wise",
- "report_type": "Script Report"
+ "report_type": "Script Report",
+ "roles": [
+ {
+ "role": "Sales User"
+ },
+ {
+ "role": "Sales Manager"
+ },
+ {
+ "role": "Maintenance User"
+ },
+ {
+ "role": "Accounts User"
+ },
+ {
+ "role": "Stock User"
+ }
+ ]
}
\ No newline at end of file
diff --git a/erpnext/setup/doctype/authorization_control/authorization_control.py b/erpnext/setup/doctype/authorization_control/authorization_control.py
index f1c198c..7d5e80b 100644
--- a/erpnext/setup/doctype/authorization_control/authorization_control.py
+++ b/erpnext/setup/doctype/authorization_control/authorization_control.py
@@ -213,7 +213,7 @@
app_specific_user.append(m['approving_user'])
elif m['approving_role']:
user_lst = [z[0] for z in frappe.db.sql("""select distinct t1.name
- from `tabUser` t1, `tabUserRole` t2 where t2.role=%s
+ from `tabUser` t1, `tabHas Role` t2 where t2.role=%s
and t2.parent=t1.name and t1.name !='Administrator'
and t1.name != 'Guest' and t1.docstatus !=2""", m['approving_role'])]
diff --git a/erpnext/setup/doctype/company/company.json b/erpnext/setup/doctype/company/company.json
index 6f949c8..f52d71e 100644
--- a/erpnext/setup/doctype/company/company.json
+++ b/erpnext/setup/doctype/company/company.json
@@ -107,7 +107,7 @@
"bold": 0,
"collapsible": 0,
"columns": 0,
- "depends_on": "eval:!doc.__islocal && in_list(user_roles, \"System Manager\")",
+ "depends_on": "eval:!doc.__islocal && in_list(roles, \"System Manager\")",
"fieldname": "change_abbr",
"fieldtype": "Button",
"hidden": 0,
@@ -827,6 +827,8 @@
"hidden": 0,
"ignore_user_permissions": 1,
"ignore_xss_filter": 0,
+ "in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Default Payroll Payable Account",
@@ -1005,7 +1007,6 @@
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
-
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Credit Days Based On",
@@ -1691,7 +1692,7 @@
"istable": 0,
"max_attachments": 0,
"menu_index": 0,
- "modified": "2017-03-02 13:24:43.849009",
+ "modified": "2017-03-02 15:24:52.908559",
"modified_by": "Administrator",
"module": "Setup",
"name": "Company",
diff --git a/erpnext/setup/setup_wizard/domainify.py b/erpnext/setup/setup_wizard/domainify.py
index 14e2f33..5963675 100644
--- a/erpnext/setup/setup_wizard/domainify.py
+++ b/erpnext/setup/setup_wizard/domainify.py
@@ -96,7 +96,7 @@
def setup_roles(data):
'''Add, remove roles from `data.allow_roles` or `data.remove_roles`'''
def remove_role(role):
- frappe.db.sql('delete from tabUserRole where role=%s', role)
+ frappe.db.sql('delete from `tabHas Role` where role=%s', role)
frappe.set_value('Role', role, 'disabled', 1)
if data.remove_roles:
diff --git a/erpnext/stock/reorder_item.py b/erpnext/stock/reorder_item.py
index 5131381..01a6a6d 100644
--- a/erpnext/stock/reorder_item.py
+++ b/erpnext/stock/reorder_item.py
@@ -164,7 +164,7 @@
""" Notify user about auto creation of indent"""
email_list = frappe.db.sql_list("""select distinct r.parent
- from tabUserRole r, tabUser p
+ from `tabHas Role` r, tabUser p
where p.name = r.parent and p.enabled = 1 and p.docstatus < 2
and r.role in ('Purchase Manager','Stock Manager')
and p.name not in ('Administrator', 'All', 'Guest')""")
diff --git a/erpnext/stock/report/batch_item_expiry_status/batch_item_expiry_status.json b/erpnext/stock/report/batch_item_expiry_status/batch_item_expiry_status.json
index d5d23ba..e5f5008 100644
--- a/erpnext/stock/report/batch_item_expiry_status/batch_item_expiry_status.json
+++ b/erpnext/stock/report/batch_item_expiry_status/batch_item_expiry_status.json
@@ -5,14 +5,22 @@
"disabled": 0,
"docstatus": 0,
"doctype": "Report",
- "idx": 0,
+ "idx": 2,
"is_standard": "Yes",
- "modified": "2016-12-21 11:29:01.884436",
+ "modified": "2017-02-24 20:00:30.392287",
"modified_by": "Administrator",
"module": "Stock",
"name": "Batch Item Expiry Status",
"owner": "Administrator",
"ref_doctype": "Stock Ledger Entry",
"report_name": "Batch Item Expiry Status",
- "report_type": "Script Report"
+ "report_type": "Script Report",
+ "roles": [
+ {
+ "role": "Stock User"
+ },
+ {
+ "role": "Accounts Manager"
+ }
+ ]
}
\ No newline at end of file
diff --git a/erpnext/stock/report/batch_wise_balance_history/batch_wise_balance_history.json b/erpnext/stock/report/batch_wise_balance_history/batch_wise_balance_history.json
index b70e650..8ff7d75 100644
--- a/erpnext/stock/report/batch_wise_balance_history/batch_wise_balance_history.json
+++ b/erpnext/stock/report/batch_wise_balance_history/batch_wise_balance_history.json
@@ -1,16 +1,26 @@
{
+ "add_total_row": 0,
"apply_user_permissions": 1,
"creation": "2013-06-04 11:03:47",
+ "disabled": 0,
"docstatus": 0,
"doctype": "Report",
- "idx": 1,
+ "idx": 3,
"is_standard": "Yes",
- "modified": "2014-06-03 07:18:16.931839",
+ "modified": "2017-02-24 20:19:13.150769",
"modified_by": "Administrator",
"module": "Stock",
"name": "Batch-Wise Balance History",
"owner": "Administrator",
"ref_doctype": "Stock Ledger Entry",
"report_name": "Batch-Wise Balance History",
- "report_type": "Script Report"
+ "report_type": "Script Report",
+ "roles": [
+ {
+ "role": "Stock User"
+ },
+ {
+ "role": "Accounts Manager"
+ }
+ ]
}
\ No newline at end of file
diff --git a/erpnext/stock/report/bom_search/bom_search.json b/erpnext/stock/report/bom_search/bom_search.json
index 2857c17..9b63652 100644
--- a/erpnext/stock/report/bom_search/bom_search.json
+++ b/erpnext/stock/report/bom_search/bom_search.json
@@ -5,13 +5,22 @@
"disabled": 0,
"docstatus": 0,
"doctype": "Report",
+ "idx": 2,
"is_standard": "Yes",
- "modified": "2015-06-16 15:16:29.850834",
+ "modified": "2017-02-24 20:19:57.286857",
"modified_by": "Administrator",
"module": "Stock",
"name": "BOM Search",
"owner": "Administrator",
"ref_doctype": "BOM",
"report_name": "BOM Search",
- "report_type": "Script Report"
+ "report_type": "Script Report",
+ "roles": [
+ {
+ "role": "Manufacturing Manager"
+ },
+ {
+ "role": "Manufacturing User"
+ }
+ ]
}
\ No newline at end of file
diff --git a/erpnext/stock/report/delivery_note_trends/delivery_note_trends.json b/erpnext/stock/report/delivery_note_trends/delivery_note_trends.json
index e8953d4..29aeab1 100644
--- a/erpnext/stock/report/delivery_note_trends/delivery_note_trends.json
+++ b/erpnext/stock/report/delivery_note_trends/delivery_note_trends.json
@@ -1,16 +1,32 @@
{
+ "add_total_row": 0,
"apply_user_permissions": 1,
"creation": "2013-06-13 18:42:11",
+ "disabled": 0,
"docstatus": 0,
"doctype": "Report",
- "idx": 1,
+ "idx": 3,
"is_standard": "Yes",
- "modified": "2014-06-03 07:18:17.040345",
+ "modified": "2017-02-24 20:18:32.793637",
"modified_by": "Administrator",
"module": "Stock",
"name": "Delivery Note Trends",
"owner": "Administrator",
"ref_doctype": "Delivery Note",
"report_name": "Delivery Note Trends",
- "report_type": "Script Report"
+ "report_type": "Script Report",
+ "roles": [
+ {
+ "role": "Stock User"
+ },
+ {
+ "role": "Stock Manager"
+ },
+ {
+ "role": "Sales User"
+ },
+ {
+ "role": "Accounts User"
+ }
+ ]
}
\ No newline at end of file
diff --git a/erpnext/stock/report/item_prices/item_prices.js b/erpnext/stock/report/item_prices/item_prices.js
new file mode 100644
index 0000000..272f83e
--- /dev/null
+++ b/erpnext/stock/report/item_prices/item_prices.js
@@ -0,0 +1,8 @@
+// Copyright (c) 2016, Frappe Technologies Pvt. Ltd. and contributors
+// For license information, please see license.txt
+
+frappe.query_reports["Item Prices"] = {
+ "filters": [
+
+ ]
+}
diff --git a/erpnext/stock/report/item_prices/item_prices.json b/erpnext/stock/report/item_prices/item_prices.json
index 16b3a3f..1d5209a 100644
--- a/erpnext/stock/report/item_prices/item_prices.json
+++ b/erpnext/stock/report/item_prices/item_prices.json
@@ -1,16 +1,26 @@
{
+ "add_total_row": 0,
"apply_user_permissions": 1,
"creation": "2013-06-05 11:43:30",
+ "disabled": 0,
"docstatus": 0,
"doctype": "Report",
- "idx": 1,
+ "idx": 3,
"is_standard": "Yes",
- "modified": "2014-06-03 07:18:17.087582",
+ "modified": "2017-02-24 20:17:45.178533",
"modified_by": "Administrator",
"module": "Stock",
"name": "Item Prices",
"owner": "Administrator",
"ref_doctype": "Stock Ledger Entry",
"report_name": "Item Prices",
- "report_type": "Script Report"
+ "report_type": "Script Report",
+ "roles": [
+ {
+ "role": "Stock User"
+ },
+ {
+ "role": "Accounts Manager"
+ }
+ ]
}
\ No newline at end of file
diff --git a/erpnext/stock/report/item_shortage_report/item_shortage_report.json b/erpnext/stock/report/item_shortage_report/item_shortage_report.json
index 3bbc0f6..577a853 100644
--- a/erpnext/stock/report/item_shortage_report/item_shortage_report.json
+++ b/erpnext/stock/report/item_shortage_report/item_shortage_report.json
@@ -5,10 +5,10 @@
"disabled": 0,
"docstatus": 0,
"doctype": "Report",
- "idx": 1,
+ "idx": 3,
"is_standard": "Yes",
"json": "{\"add_total_row\": 0, \"sort_by\": \"Bin.projected_qty\", \"sort_order\": \"asc\", \"sort_by_next\": \"\", \"filters\": [[\"Bin\", \"projected_qty\", \"<\", \"0\"]], \"sort_order_next\": \"desc\", \"columns\": [[\"warehouse\", \"Bin\"], [\"item_code\", \"Bin\"], [\"actual_qty\", \"Bin\"], [\"ordered_qty\", \"Bin\"], [\"planned_qty\", \"Bin\"], [\"reserved_qty\", \"Bin\"], [\"projected_qty\", \"Bin\"]]}",
- "modified": "2016-12-05 18:49:41.909411",
+ "modified": "2017-02-24 20:00:46.439935",
"modified_by": "Administrator",
"module": "Stock",
"name": "Item Shortage Report",
@@ -16,5 +16,16 @@
"query": "SELECT bin.warehouse as \"Warehouse:Link/Warehouse:150\",\n\tbin.item_code as \"Item Code:Link/Item:100\",\n\tbin.actual_qty as \"Actual Quantity:Float:120\",\n\tbin.ordered_qty as \"Ordered Quantity:Float:120\",\n\tbin.planned_qty as \"Planned Quantity:Float:120\",\n\tbin.reserved_qty as \"Reserved Quantity:Float:120\",\n\tbin.projected_qty as \"Project Quantity:Float:120\",\n\titem.item_name as \"Item Name:Data:150\",\n\titem.description as \"Description::200\"\nFROM tabBin as bin\nINNER JOIN tabItem as item\nON bin.item_code=item.name\nWHERE bin.projected_qty<0\nORDER BY bin.projected_qty;",
"ref_doctype": "Bin",
"report_name": "Item Shortage Report",
- "report_type": "Query Report"
+ "report_type": "Query Report",
+ "roles": [
+ {
+ "role": "Sales User"
+ },
+ {
+ "role": "Purchase User"
+ },
+ {
+ "role": "Stock User"
+ }
+ ]
}
\ No newline at end of file
diff --git a/erpnext/stock/report/item_wise_price_list_rate/item_wise_price_list_rate.json b/erpnext/stock/report/item_wise_price_list_rate/item_wise_price_list_rate.json
index bcca0b4..137d603 100644
--- a/erpnext/stock/report/item_wise_price_list_rate/item_wise_price_list_rate.json
+++ b/erpnext/stock/report/item_wise_price_list_rate/item_wise_price_list_rate.json
@@ -5,15 +5,23 @@
"disabled": 0,
"docstatus": 0,
"doctype": "Report",
- "idx": 1,
+ "idx": 3,
"is_standard": "Yes",
"json": "{\"add_total_row\": 0, \"sort_by\": \"Item Price.modified\", \"sort_order\": \"desc\", \"sort_by_next\": null, \"filters\": [], \"sort_order_next\": \"desc\", \"columns\": [[\"name\", \"Item Price\"], [\"price_list\", \"Item Price\"], [\"item_code\", \"Item Price\"], [\"item_name\", \"Item Price\"], [\"item_description\", \"Item Price\"], [\"price_list_rate\", \"Item Price\"], [\"buying\", \"Item Price\"], [\"selling\", \"Item Price\"], [\"currency\", \"Item Price\"]]}",
- "modified": "2016-12-05 18:49:15.693076",
+ "modified": "2017-02-24 20:02:09.364303",
"modified_by": "Administrator",
"module": "Stock",
"name": "Item-wise Price List Rate",
"owner": "Administrator",
"ref_doctype": "Item Price",
"report_name": "Item-wise Price List Rate",
- "report_type": "Report Builder"
+ "report_type": "Report Builder",
+ "roles": [
+ {
+ "role": "Sales Master Manager"
+ },
+ {
+ "role": "Purchase Master Manager"
+ }
+ ]
}
\ No newline at end of file
diff --git a/erpnext/stock/report/items_to_be_requested/items_to_be_requested.json b/erpnext/stock/report/items_to_be_requested/items_to_be_requested.json
index 616eae1..2ac658a 100644
--- a/erpnext/stock/report/items_to_be_requested/items_to_be_requested.json
+++ b/erpnext/stock/report/items_to_be_requested/items_to_be_requested.json
@@ -5,9 +5,9 @@
"disabled": 0,
"docstatus": 0,
"doctype": "Report",
- "idx": 1,
+ "idx": 3,
"is_standard": "Yes",
- "modified": "2016-06-29 17:39:54.122679",
+ "modified": "2017-02-24 20:06:00.761719",
"modified_by": "Administrator",
"module": "Stock",
"name": "Items To Be Requested",
@@ -15,5 +15,19 @@
"query": "SELECT\n tabBin.item_code as \"Item:Link/Item:120\",\n tabBin.warehouse as \"Warehouse:Link/Warehouse:120\",\n tabBin.actual_qty as \"Actual:Float:90\",\n tabBin.indented_qty as \"Requested:Float:90\",\n tabBin.reserved_qty as \"Reserved:Float:90\",\n tabBin.ordered_qty as \"Ordered:Float:90\",\n tabBin.projected_qty as \"Projected:Float:90\"\nFROM\n tabBin, tabItem\nWHERE\n tabBin.item_code = tabItem.name\n AND tabBin.projected_qty < 0\nORDER BY\n tabBin.projected_qty ASC",
"ref_doctype": "Material Request",
"report_name": "Items To Be Requested",
- "report_type": "Query Report"
+ "report_type": "Query Report",
+ "roles": [
+ {
+ "role": "Purchase Manager"
+ },
+ {
+ "role": "Stock Manager"
+ },
+ {
+ "role": "Stock User"
+ },
+ {
+ "role": "Purchase User"
+ }
+ ]
}
\ No newline at end of file
diff --git a/erpnext/stock/report/itemwise_recommended_reorder_level/itemwise_recommended_reorder_level.json b/erpnext/stock/report/itemwise_recommended_reorder_level/itemwise_recommended_reorder_level.json
index c13f65a..5ab58cc 100644
--- a/erpnext/stock/report/itemwise_recommended_reorder_level/itemwise_recommended_reorder_level.json
+++ b/erpnext/stock/report/itemwise_recommended_reorder_level/itemwise_recommended_reorder_level.json
@@ -1,16 +1,44 @@
{
+ "add_total_row": 0,
"apply_user_permissions": 1,
"creation": "2013-06-07 12:47:22",
+ "disabled": 0,
"docstatus": 0,
"doctype": "Report",
- "idx": 1,
+ "idx": 3,
"is_standard": "Yes",
- "modified": "2014-06-03 07:18:17.134165",
+ "modified": "2017-02-24 20:17:06.151929",
"modified_by": "Administrator",
"module": "Stock",
"name": "Itemwise Recommended Reorder Level",
"owner": "Administrator",
"ref_doctype": "Item",
"report_name": "Itemwise Recommended Reorder Level",
- "report_type": "Script Report"
+ "report_type": "Script Report",
+ "roles": [
+ {
+ "role": "Item Manager"
+ },
+ {
+ "role": "Stock Manager"
+ },
+ {
+ "role": "Stock User"
+ },
+ {
+ "role": "Sales User"
+ },
+ {
+ "role": "Purchase User"
+ },
+ {
+ "role": "Maintenance User"
+ },
+ {
+ "role": "Accounts User"
+ },
+ {
+ "role": "Manufacturing User"
+ }
+ ]
}
\ No newline at end of file
diff --git a/erpnext/stock/report/material_requests_for_which_supplier_quotations_are_not_created/material_requests_for_which_supplier_quotations_are_not_created.json b/erpnext/stock/report/material_requests_for_which_supplier_quotations_are_not_created/material_requests_for_which_supplier_quotations_are_not_created.json
index 8615684..f8cec4d 100644
--- a/erpnext/stock/report/material_requests_for_which_supplier_quotations_are_not_created/material_requests_for_which_supplier_quotations_are_not_created.json
+++ b/erpnext/stock/report/material_requests_for_which_supplier_quotations_are_not_created/material_requests_for_which_supplier_quotations_are_not_created.json
@@ -1,19 +1,33 @@
{
- "add_total_row": 0,
- "apply_user_permissions": 1,
- "creation": "2013-08-09 12:20:58",
- "disabled": 0,
- "docstatus": 0,
- "doctype": "Report",
- "idx": 1,
- "is_standard": "Yes",
- "modified": "2016-07-08 05:43:10.236943",
- "modified_by": "Administrator",
- "module": "Stock",
- "name": "Material Requests for which Supplier Quotations are not created",
- "owner": "Administrator",
- "query": "select \n mr.name as \"Material Request:Link/Material Request:120\",\n mr.transaction_date as \"Date:Date:100\",\n\tmr_item.item_code as \"Item Code:Link/Item:120\",\n\tmr_item.qty as \"Qty:Float:100\",\n\tmr_item.item_name as \"Item Name::150\",\n\tmr_item.description as \"Description::200\",\n\tmr.company as \"Company:Link/Company:\"\nfrom\n\t`tabMaterial Request` mr, `tabMaterial Request Item` mr_item\nwhere\n\tmr_item.parent = mr.name\n\tand mr.material_request_type = \"Purchase\"\n\tand mr.docstatus = 1\n\tand mr.status != \"Stopped\"\n\tand not exists(select name from `tabSupplier Quotation Item` where material_request=mr.name)\norder by mr.transaction_date asc",
- "ref_doctype": "Material Request",
- "report_name": "Material Requests for which Supplier Quotations are not created",
- "report_type": "Query Report"
+ "add_total_row": 0,
+ "apply_user_permissions": 1,
+ "creation": "2013-08-09 12:20:58",
+ "disabled": 0,
+ "docstatus": 0,
+ "doctype": "Report",
+ "idx": 3,
+ "is_standard": "Yes",
+ "modified": "2017-02-24 20:05:31.066151",
+ "modified_by": "Administrator",
+ "module": "Stock",
+ "name": "Material Requests for which Supplier Quotations are not created",
+ "owner": "Administrator",
+ "query": "select \n mr.name as \"Material Request:Link/Material Request:120\",\n mr.transaction_date as \"Date:Date:100\",\n\tmr_item.item_code as \"Item Code:Link/Item:120\",\n\tmr_item.qty as \"Qty:Float:100\",\n\tmr_item.item_name as \"Item Name::150\",\n\tmr_item.description as \"Description::200\",\n\tmr.company as \"Company:Link/Company:\"\nfrom\n\t`tabMaterial Request` mr, `tabMaterial Request Item` mr_item\nwhere\n\tmr_item.parent = mr.name\n\tand mr.material_request_type = \"Purchase\"\n\tand mr.docstatus = 1\n\tand mr.status != \"Stopped\"\n\tand not exists(select name from `tabSupplier Quotation Item` where material_request=mr.name)\norder by mr.transaction_date asc",
+ "ref_doctype": "Material Request",
+ "report_name": "Material Requests for which Supplier Quotations are not created",
+ "report_type": "Query Report",
+ "roles": [
+ {
+ "role": "Purchase Manager"
+ },
+ {
+ "role": "Stock Manager"
+ },
+ {
+ "role": "Stock User"
+ },
+ {
+ "role": "Purchase User"
+ }
+ ]
}
\ No newline at end of file
diff --git a/erpnext/stock/report/ordered_items_to_be_delivered/ordered_items_to_be_delivered.json b/erpnext/stock/report/ordered_items_to_be_delivered/ordered_items_to_be_delivered.json
index be00340..1ec1578 100644
--- a/erpnext/stock/report/ordered_items_to_be_delivered/ordered_items_to_be_delivered.json
+++ b/erpnext/stock/report/ordered_items_to_be_delivered/ordered_items_to_be_delivered.json
@@ -5,9 +5,9 @@
"disabled": 0,
"docstatus": 0,
"doctype": "Report",
- "idx": 1,
+ "idx": 3,
"is_standard": "Yes",
- "modified": "2016-08-18 14:34:11.263672",
+ "modified": "2017-02-24 20:04:38.689198",
"modified_by": "Administrator",
"module": "Stock",
"name": "Ordered Items To Be Delivered",
@@ -15,5 +15,19 @@
"query": "select \n `tabSales Order`.`name` as \"Sales Order:Link/Sales Order:120\",\n `tabSales Order`.`customer` as \"Customer:Link/Customer:120\",\n `tabSales Order`.`customer_name` as \"Customer Name::150\",\n `tabSales Order`.`transaction_date` as \"Date:Date\",\n `tabSales Order`.`project` as \"Project\",\n `tabSales Order Item`.item_code as \"Item:Link/Item:120\",\n `tabSales Order Item`.qty as \"Qty:Float:140\",\n `tabSales Order Item`.delivered_qty as \"Delivered Qty:Float:140\",\n (`tabSales Order Item`.qty - ifnull(`tabSales Order Item`.delivered_qty, 0)) as \"Qty to Deliver:Float:140\",\n `tabSales Order Item`.base_rate as \"Rate:Float:140\",\n `tabSales Order Item`.base_amount as \"Amount:Float:140\",\n ((`tabSales Order Item`.qty - ifnull(`tabSales Order Item`.delivered_qty, 0))*`tabSales Order Item`.base_rate) as \"Amount to Deliver:Float:140\",\n `tabBin`.actual_qty as \"Available Qty:Float:120\",\n `tabBin`.projected_qty as \"Projected Qty:Float:120\",\n `tabSales Order`.`delivery_date` as \"Expected Delivery Date:Date:120\",\n `tabSales Order Item`.item_name as \"Item Name::150\",\n `tabSales Order Item`.description as \"Description::200\",\n `tabSales Order Item`.item_group as \"Item Group:Link/Item Group:120\",\n `tabSales Order Item`.warehouse as \"Warehouse:Link/Warehouse:200\"\nfrom\n `tabSales Order` JOIN `tabSales Order Item` \n LEFT JOIN `tabBin` ON (`tabBin`.item_code = `tabSales Order Item`.item_code\n and `tabBin`.warehouse = `tabSales Order Item`.warehouse)\nwhere\n `tabSales Order Item`.`parent` = `tabSales Order`.`name`\n and `tabSales Order`.docstatus = 1\n and `tabSales Order`.status not in (\"Stopped\", \"Closed\")\n and ifnull(`tabSales Order Item`.delivered_qty,0) < ifnull(`tabSales Order Item`.qty,0)\norder by `tabSales Order`.transaction_date asc",
"ref_doctype": "Delivery Note",
"report_name": "Ordered Items To Be Delivered",
- "report_type": "Query Report"
+ "report_type": "Query Report",
+ "roles": [
+ {
+ "role": "Stock User"
+ },
+ {
+ "role": "Stock Manager"
+ },
+ {
+ "role": "Sales User"
+ },
+ {
+ "role": "Accounts User"
+ }
+ ]
}
\ No newline at end of file
diff --git a/erpnext/stock/report/purchase_order_items_to_be_received/purchase_order_items_to_be_received.json b/erpnext/stock/report/purchase_order_items_to_be_received/purchase_order_items_to_be_received.json
index ad55985..3c440f4 100644
--- a/erpnext/stock/report/purchase_order_items_to_be_received/purchase_order_items_to_be_received.json
+++ b/erpnext/stock/report/purchase_order_items_to_be_received/purchase_order_items_to_be_received.json
@@ -5,9 +5,9 @@
"disabled": 0,
"docstatus": 0,
"doctype": "Report",
- "idx": 1,
+ "idx": 3,
"is_standard": "Yes",
- "modified": "2016-08-18 14:36:12.159987",
+ "modified": "2017-02-24 20:04:20.699195",
"modified_by": "Administrator",
"module": "Stock",
"name": "Purchase Order Items To Be Received",
@@ -15,5 +15,19 @@
"query": "select \n `tabPurchase Order`.`name` as \"Purchase Order:Link/Purchase Order:120\",\n\t`tabPurchase Order`.`transaction_date` as \"Date:Date:100\",\n\t`tabPurchase Order Item`.`schedule_date` as \"Reqd by Date:Date:110\",\n\t`tabPurchase Order`.`supplier` as \"Supplier:Link/Supplier:120\",\n\t`tabPurchase Order`.`supplier_name` as \"Supplier Name::150\",\n\t`tabPurchase Order Item`.`project` as \"Project\",\n\t`tabPurchase Order Item`.item_code as \"Item Code:Link/Item:120\",\n\t`tabPurchase Order Item`.qty as \"Qty:Float:100\",\n\t`tabPurchase Order Item`.received_qty as \"Received Qty:Float:100\", \n\t(`tabPurchase Order Item`.qty - ifnull(`tabPurchase Order Item`.received_qty, 0)) as \"Qty to Receive:Float:100\",\n `tabPurchase Order Item`.warehouse as \"Warehouse:Link/Warehouse:150\",\n\t`tabPurchase Order Item`.item_name as \"Item Name::150\",\n\t`tabPurchase Order Item`.description as \"Description::200\",\n `tabPurchase Order Item`.brand as \"Brand::100\",\n\t`tabPurchase Order`.`company` as \"Company:Link/Company:\"\nfrom\n\t`tabPurchase Order`, `tabPurchase Order Item`\nwhere\n\t`tabPurchase Order Item`.`parent` = `tabPurchase Order`.`name`\n\tand `tabPurchase Order`.docstatus = 1\n\tand `tabPurchase Order`.status not in (\"Stopped\", \"Closed\")\n\tand ifnull(`tabPurchase Order Item`.received_qty, 0) < ifnull(`tabPurchase Order Item`.qty, 0)\norder by `tabPurchase Order`.transaction_date asc",
"ref_doctype": "Purchase Receipt",
"report_name": "Purchase Order Items To Be Received",
- "report_type": "Query Report"
+ "report_type": "Query Report",
+ "roles": [
+ {
+ "role": "Stock Manager"
+ },
+ {
+ "role": "Stock User"
+ },
+ {
+ "role": "Purchase User"
+ },
+ {
+ "role": "Accounts User"
+ }
+ ]
}
\ No newline at end of file
diff --git a/erpnext/stock/report/purchase_receipt_trends/purchase_receipt_trends.json b/erpnext/stock/report/purchase_receipt_trends/purchase_receipt_trends.json
index be1835f..3a09b43 100644
--- a/erpnext/stock/report/purchase_receipt_trends/purchase_receipt_trends.json
+++ b/erpnext/stock/report/purchase_receipt_trends/purchase_receipt_trends.json
@@ -1,16 +1,32 @@
{
+ "add_total_row": 0,
"apply_user_permissions": 1,
"creation": "2013-06-13 18:45:44",
+ "disabled": 0,
"docstatus": 0,
"doctype": "Report",
- "idx": 1,
+ "idx": 3,
"is_standard": "Yes",
- "modified": "2014-06-03 07:18:17.260182",
+ "modified": "2017-02-24 20:16:00.211762",
"modified_by": "Administrator",
"module": "Stock",
"name": "Purchase Receipt Trends",
"owner": "Administrator",
"ref_doctype": "Purchase Receipt",
"report_name": "Purchase Receipt Trends",
- "report_type": "Script Report"
+ "report_type": "Script Report",
+ "roles": [
+ {
+ "role": "Stock Manager"
+ },
+ {
+ "role": "Stock User"
+ },
+ {
+ "role": "Purchase User"
+ },
+ {
+ "role": "Accounts User"
+ }
+ ]
}
\ No newline at end of file
diff --git a/erpnext/stock/report/requested_items_to_be_transferred/requested_items_to_be_transferred.json b/erpnext/stock/report/requested_items_to_be_transferred/requested_items_to_be_transferred.json
index a361ffb..a569f46 100644
--- a/erpnext/stock/report/requested_items_to_be_transferred/requested_items_to_be_transferred.json
+++ b/erpnext/stock/report/requested_items_to_be_transferred/requested_items_to_be_transferred.json
@@ -5,9 +5,9 @@
"disabled": 0,
"docstatus": 0,
"doctype": "Report",
- "idx": 1,
+ "idx": 3,
"is_standard": "Yes",
- "modified": "2016-06-08 16:40:17.254701",
+ "modified": "2017-02-24 20:07:57.880462",
"modified_by": "Administrator",
"module": "Stock",
"name": "Requested Items To Be Transferred",
@@ -15,5 +15,19 @@
"query": "select \n mr.name as \"Material Request:Link/Material Request:120\",\n\tmr.transaction_date as \"Date:Date:100\",\n\tmr_item.item_code as \"Item Code:Link/Item:120\",\n\tmr_item.qty as \"Qty:Float:100\",\n\tmr_item.ordered_qty as \"Transferred Qty:Float:100\", \n\t(mr_item.qty - ifnull(mr_item.ordered_qty, 0)) as \"Qty to Transfer:Float:100\",\n\tmr_item.item_name as \"Item Name::150\",\n\tmr_item.description as \"Description::200\",\n\tmr.company as \"Company:Link/Company:\"\nfrom\n\t`tabMaterial Request` mr, `tabMaterial Request Item` mr_item\nwhere\n\tmr_item.parent = mr.name\n\tand mr.material_request_type in (\"Material Transfer\", \"Material Issue\")\n\tand mr.docstatus = 1\n\tand mr.status != \"Stopped\"\n\tand ifnull(mr_item.ordered_qty, 0) < ifnull(mr_item.qty, 0)\norder by mr.transaction_date asc",
"ref_doctype": "Stock Entry",
"report_name": "Requested Items To Be Transferred",
- "report_type": "Query Report"
+ "report_type": "Query Report",
+ "roles": [
+ {
+ "role": "Stock User"
+ },
+ {
+ "role": "Manufacturing User"
+ },
+ {
+ "role": "Manufacturing Manager"
+ },
+ {
+ "role": "Stock Manager"
+ }
+ ]
}
\ No newline at end of file
diff --git a/erpnext/stock/report/serial_no_service_contract_expiry/serial_no_service_contract_expiry.json b/erpnext/stock/report/serial_no_service_contract_expiry/serial_no_service_contract_expiry.json
index 2879d98..6d20719 100644
--- a/erpnext/stock/report/serial_no_service_contract_expiry/serial_no_service_contract_expiry.json
+++ b/erpnext/stock/report/serial_no_service_contract_expiry/serial_no_service_contract_expiry.json
@@ -5,15 +5,26 @@
"disabled": 0,
"docstatus": 0,
"doctype": "Report",
- "idx": 1,
+ "idx": 3,
"is_standard": "Yes",
"json": "{\"add_total_row\": 0, \"sort_by\": \"Serial No.modified\", \"sort_order\": \"desc\", \"sort_by_next\": null, \"filters\": [[\"Serial No\", \"delivery_document_type\", \"in\", [\"Delivery Note\", \"Sales Invoice\"]], [\"Serial No\", \"warehouse\", \"=\", \"\"]], \"sort_order_next\": \"desc\", \"columns\": [[\"name\", \"Serial No\"], [\"item_code\", \"Serial No\"], [\"amc_expiry_date\", \"Serial No\"], [\"maintenance_status\", \"Serial No\"], [\"delivery_document_no\", \"Serial No\"], [\"customer\", \"Serial No\"], [\"customer_name\", \"Serial No\"], [\"item_name\", \"Serial No\"], [\"description\", \"Serial No\"], [\"item_group\", \"Serial No\"], [\"brand\", \"Serial No\"]]}",
- "modified": "2016-12-05 18:49:22.748446",
+ "modified": "2017-02-24 20:02:00.706889",
"modified_by": "Administrator",
"module": "Stock",
"name": "Serial No Service Contract Expiry",
"owner": "Administrator",
"ref_doctype": "Serial No",
"report_name": "Serial No Service Contract Expiry",
- "report_type": "Report Builder"
+ "report_type": "Report Builder",
+ "roles": [
+ {
+ "role": "Item Manager"
+ },
+ {
+ "role": "Stock Manager"
+ },
+ {
+ "role": "Stock User"
+ }
+ ]
}
\ No newline at end of file
diff --git a/erpnext/stock/report/serial_no_status/serial_no_status.json b/erpnext/stock/report/serial_no_status/serial_no_status.json
index 99b99f7..8f03567 100644
--- a/erpnext/stock/report/serial_no_status/serial_no_status.json
+++ b/erpnext/stock/report/serial_no_status/serial_no_status.json
@@ -5,15 +5,26 @@
"disabled": 0,
"docstatus": 0,
"doctype": "Report",
- "idx": 1,
+ "idx": 4,
"is_standard": "Yes",
"json": "{\"add_total_row\": 0, \"sort_by\": \"Serial No.name\", \"sort_order\": \"desc\", \"sort_by_next\": null, \"filters\": [], \"sort_order_next\": \"desc\", \"columns\": [[\"name\", \"Serial No\"], [\"item_code\", \"Serial No\"], [\"warehouse\", \"Serial No\"], [\"item_name\", \"Serial No\"], [\"description\", \"Serial No\"], [\"item_group\", \"Serial No\"], [\"brand\", \"Serial No\"], [\"purchase_document_type\", \"Serial No\"], [\"purchase_document_no\", \"Serial No\"], [\"purchase_date\", \"Serial No\"], [\"customer\", \"Serial No\"], [\"customer_name\", \"Serial No\"], [\"purchase_rate\", \"Serial No\"], [\"delivery_document_type\", \"Serial No\"], [\"delivery_document_no\", \"Serial No\"], [\"delivery_date\", \"Serial No\"], [\"supplier\", \"Serial No\"], [\"supplier_name\", \"Serial No\"]]}",
- "modified": "2017-02-14 18:50:31.424300",
+ "modified": "2017-02-24 19:54:21.392265",
"modified_by": "Administrator",
"module": "Stock",
"name": "Serial No Status",
"owner": "Administrator",
"ref_doctype": "Serial No",
"report_name": "Serial No Status",
- "report_type": "Report Builder"
+ "report_type": "Report Builder",
+ "roles": [
+ {
+ "role": "Item Manager"
+ },
+ {
+ "role": "Stock Manager"
+ },
+ {
+ "role": "Stock User"
+ }
+ ]
}
\ No newline at end of file
diff --git a/erpnext/stock/report/serial_no_warranty_expiry/serial_no_warranty_expiry.json b/erpnext/stock/report/serial_no_warranty_expiry/serial_no_warranty_expiry.json
index 6905671..ef345f4 100644
--- a/erpnext/stock/report/serial_no_warranty_expiry/serial_no_warranty_expiry.json
+++ b/erpnext/stock/report/serial_no_warranty_expiry/serial_no_warranty_expiry.json
@@ -5,15 +5,26 @@
"disabled": 0,
"docstatus": 0,
"doctype": "Report",
- "idx": 1,
+ "idx": 3,
"is_standard": "Yes",
"json": "{\"add_total_row\": 0, \"sort_by\": \"Serial No.modified\", \"sort_order\": \"desc\", \"sort_by_next\": null, \"filters\": [[\"Serial No\", \"delivery_document_type\", \"in\", [\"Delivery Note\", \"Sales Invoice\"]], [\"Serial No\", \"warehouse\", \"=\", \"\"]], \"sort_order_next\": \"desc\", \"columns\": [[\"name\", \"Serial No\"], [\"item_code\", \"Serial No\"], [\"warranty_expiry_date\", \"Serial No\"], [\"warranty_period\", \"Serial No\"], [\"maintenance_status\", \"Serial No\"], [\"purchase_document_no\", \"Serial No\"], [\"purchase_date\", \"Serial No\"], [\"supplier\", \"Serial No\"], [\"supplier_name\", \"Serial No\"], [\"delivery_document_no\", \"Serial No\"], [\"delivery_date\", \"Serial No\"], [\"customer\", \"Serial No\"], [\"customer_name\", \"Serial No\"], [\"item_name\", \"Serial No\"], [\"description\", \"Serial No\"], [\"item_group\", \"Serial No\"], [\"brand\", \"Serial No\"]]}",
- "modified": "2016-12-05 18:49:26.761364",
+ "modified": "2017-02-24 20:01:53.097456",
"modified_by": "Administrator",
"module": "Stock",
"name": "Serial No Warranty Expiry",
"owner": "Administrator",
"ref_doctype": "Serial No",
"report_name": "Serial No Warranty Expiry",
- "report_type": "Report Builder"
+ "report_type": "Report Builder",
+ "roles": [
+ {
+ "role": "Item Manager"
+ },
+ {
+ "role": "Stock Manager"
+ },
+ {
+ "role": "Stock User"
+ }
+ ]
}
\ No newline at end of file
diff --git a/erpnext/stock/report/stock_ageing/stock_ageing.json b/erpnext/stock/report/stock_ageing/stock_ageing.json
index 44fec72..f3f2417 100644
--- a/erpnext/stock/report/stock_ageing/stock_ageing.json
+++ b/erpnext/stock/report/stock_ageing/stock_ageing.json
@@ -1,16 +1,44 @@
{
+ "add_total_row": 0,
"apply_user_permissions": 1,
"creation": "2013-12-02 17:09:31",
+ "disabled": 0,
"docstatus": 0,
"doctype": "Report",
- "idx": 1,
+ "idx": 3,
"is_standard": "Yes",
- "modified": "2014-06-03 07:18:17.338033",
+ "modified": "2017-02-24 20:14:20.184693",
"modified_by": "Administrator",
"module": "Stock",
"name": "Stock Ageing",
"owner": "Administrator",
"ref_doctype": "Item",
"report_name": "Stock Ageing",
- "report_type": "Script Report"
+ "report_type": "Script Report",
+ "roles": [
+ {
+ "role": "Item Manager"
+ },
+ {
+ "role": "Stock Manager"
+ },
+ {
+ "role": "Stock User"
+ },
+ {
+ "role": "Sales User"
+ },
+ {
+ "role": "Purchase User"
+ },
+ {
+ "role": "Maintenance User"
+ },
+ {
+ "role": "Accounts User"
+ },
+ {
+ "role": "Manufacturing User"
+ }
+ ]
}
\ No newline at end of file
diff --git a/erpnext/stock/report/stock_balance/stock_balance.json b/erpnext/stock/report/stock_balance/stock_balance.json
index 5f7fde0..4afbf75 100644
--- a/erpnext/stock/report/stock_balance/stock_balance.json
+++ b/erpnext/stock/report/stock_balance/stock_balance.json
@@ -5,13 +5,22 @@
"disabled": 0,
"docstatus": 0,
"doctype": "Report",
+ "idx": 2,
"is_standard": "Yes",
- "modified": "2015-05-22 02:16:24.614986",
+ "modified": "2017-02-24 20:10:13.764665",
"modified_by": "Administrator",
"module": "Stock",
"name": "Stock Balance",
"owner": "Administrator",
"ref_doctype": "Stock Ledger Entry",
"report_name": "Stock Balance",
- "report_type": "Script Report"
+ "report_type": "Script Report",
+ "roles": [
+ {
+ "role": "Stock User"
+ },
+ {
+ "role": "Accounts Manager"
+ }
+ ]
}
\ No newline at end of file
diff --git a/erpnext/stock/report/stock_ledger/stock_ledger.json b/erpnext/stock/report/stock_ledger/stock_ledger.json
index da49acb..52bc073 100644
--- a/erpnext/stock/report/stock_ledger/stock_ledger.json
+++ b/erpnext/stock/report/stock_ledger/stock_ledger.json
@@ -1,16 +1,26 @@
{
+ "add_total_row": 0,
"apply_user_permissions": 1,
"creation": "2013-11-29 17:08:23",
+ "disabled": 0,
"docstatus": 0,
"doctype": "Report",
- "idx": 1,
+ "idx": 3,
"is_standard": "Yes",
- "modified": "2014-06-03 07:18:17.343291",
+ "modified": "2017-02-24 20:14:07.626391",
"modified_by": "Administrator",
"module": "Stock",
"name": "Stock Ledger",
"owner": "Administrator",
"ref_doctype": "Stock Ledger Entry",
"report_name": "Stock Ledger",
- "report_type": "Script Report"
+ "report_type": "Script Report",
+ "roles": [
+ {
+ "role": "Stock User"
+ },
+ {
+ "role": "Accounts Manager"
+ }
+ ]
}
\ No newline at end of file
diff --git a/erpnext/stock/report/stock_projected_qty/stock_projected_qty.json b/erpnext/stock/report/stock_projected_qty/stock_projected_qty.json
index 27b85f6..00cf928 100644
--- a/erpnext/stock/report/stock_projected_qty/stock_projected_qty.json
+++ b/erpnext/stock/report/stock_projected_qty/stock_projected_qty.json
@@ -2,16 +2,43 @@
"add_total_row": 1,
"apply_user_permissions": 1,
"creation": "2013-12-04 18:21:56",
+ "disabled": 0,
"docstatus": 0,
"doctype": "Report",
- "idx": 1,
+ "idx": 3,
"is_standard": "Yes",
- "modified": "2014-06-03 07:18:17.348468",
+ "modified": "2017-02-24 20:14:00.850349",
"modified_by": "Administrator",
"module": "Stock",
"name": "Stock Projected Qty",
"owner": "Administrator",
"ref_doctype": "Item",
"report_name": "Stock Projected Qty",
- "report_type": "Script Report"
+ "report_type": "Script Report",
+ "roles": [
+ {
+ "role": "Item Manager"
+ },
+ {
+ "role": "Stock Manager"
+ },
+ {
+ "role": "Stock User"
+ },
+ {
+ "role": "Sales User"
+ },
+ {
+ "role": "Purchase User"
+ },
+ {
+ "role": "Maintenance User"
+ },
+ {
+ "role": "Accounts User"
+ },
+ {
+ "role": "Manufacturing User"
+ }
+ ]
}
\ No newline at end of file
diff --git a/erpnext/stock/report/supplier_wise_sales_analytics/supplier_wise_sales_analytics.json b/erpnext/stock/report/supplier_wise_sales_analytics/supplier_wise_sales_analytics.json
index f529942..98fc219 100644
--- a/erpnext/stock/report/supplier_wise_sales_analytics/supplier_wise_sales_analytics.json
+++ b/erpnext/stock/report/supplier_wise_sales_analytics/supplier_wise_sales_analytics.json
@@ -2,16 +2,25 @@
"add_total_row": 1,
"apply_user_permissions": 1,
"creation": "2013-11-29 15:45:39",
+ "disabled": 0,
"docstatus": 0,
"doctype": "Report",
- "idx": 1,
+ "idx": 3,
"is_standard": "Yes",
- "modified": "2014-06-03 07:18:17.363951",
+ "modified": "2017-02-24 20:13:38.914651",
"modified_by": "Administrator",
"module": "Stock",
"name": "Supplier-Wise Sales Analytics",
"owner": "Administrator",
"ref_doctype": "Stock Ledger Entry",
"report_name": "Supplier-Wise Sales Analytics",
- "report_type": "Script Report"
+ "report_type": "Script Report",
+ "roles": [
+ {
+ "role": "Stock User"
+ },
+ {
+ "role": "Accounts Manager"
+ }
+ ]
}
\ No newline at end of file
diff --git a/erpnext/support/report/minutes_to_first_response_for_issues/minutes_to_first_response_for_issues.json b/erpnext/support/report/minutes_to_first_response_for_issues/minutes_to_first_response_for_issues.json
index e6dc383..539d3d9 100644
--- a/erpnext/support/report/minutes_to_first_response_for_issues/minutes_to_first_response_for_issues.json
+++ b/erpnext/support/report/minutes_to_first_response_for_issues/minutes_to_first_response_for_issues.json
@@ -5,9 +5,9 @@
"disabled": 0,
"docstatus": 0,
"doctype": "Report",
- "idx": 0,
+ "idx": 2,
"is_standard": "Yes",
- "modified": "2016-06-14 17:50:28.082090",
+ "modified": "2017-02-24 20:06:18.391100",
"modified_by": "Administrator",
"module": "Support",
"name": "Minutes to First Response for Issues",
@@ -15,5 +15,10 @@
"query": "select date(creation) as creation_date, avg(mins_to_first_response) from tabIssue where creation > '2016-05-01' group by date(creation) order by creation_date;",
"ref_doctype": "Issue",
"report_name": "Minutes to First Response for Issues",
- "report_type": "Script Report"
+ "report_type": "Script Report",
+ "roles": [
+ {
+ "role": "Support Team"
+ }
+ ]
}
\ No newline at end of file
diff --git a/erpnext/utilities/transaction_base.py b/erpnext/utilities/transaction_base.py
index 3cc79ef..2d6cbc0 100644
--- a/erpnext/utilities/transaction_base.py
+++ b/erpnext/utilities/transaction_base.py
@@ -35,9 +35,6 @@
frappe.db.sql("delete from `tabEvent` where name in (%s)"
.format(", ".join(['%s']*len(events))), tuple(events))
- frappe.db.sql("delete from `tabEvent Role` where parent in (%s)"
- .format(", ".join(['%s']*len(events))), tuple(events))
-
def _add_calendar_event(self, opts):
opts = frappe._dict(opts)