fix: added permission and fix filters in stock balance report

This commit is contained in:
Anurag Mishra 2019-05-23 14:31:22 +05:30
parent 7376b4f4f0
commit 61a7b42aea
2 changed files with 63 additions and 4 deletions

View File

@ -13,7 +13,7 @@
"label": "Description"
}
],
"modified": "2019-05-21 15:30:06.754938",
"modified": "2019-05-23 14:30:11.435978",
"modified_by": "Administrator",
"module": "Stock",
"name": "Warehouse Type",
@ -30,6 +30,63 @@
"role": "System Manager",
"share": 1,
"write": 1
},
{
"create": 1,
"delete": 1,
"email": 1,
"export": 1,
"print": 1,
"read": 1,
"report": 1,
"role": "Item Manager",
"share": 1,
"write": 1
},
{
"email": 1,
"export": 1,
"print": 1,
"read": 1,
"report": 1,
"role": "Sales User",
"share": 1
},
{
"email": 1,
"export": 1,
"print": 1,
"read": 1,
"report": 1,
"role": "Stock User",
"share": 1
},
{
"email": 1,
"export": 1,
"print": 1,
"read": 1,
"report": 1,
"role": "Purchase User",
"share": 1
},
{
"email": 1,
"export": 1,
"print": 1,
"read": 1,
"report": 1,
"role": "Accounts User",
"share": 1
},
{
"email": 1,
"export": 1,
"print": 1,
"read": 1,
"report": 1,
"role": "Manufacturing User",
"share": 1
}
],
"quick_entry": 1,

View File

@ -52,12 +52,14 @@ frappe.query_reports["Stock Balance"] = {
"options": "Warehouse",
get_query: () => {
var warehouse_type = frappe.query_report.get_filter_value('warehouse_type');
if(warehouse_type){
return {
filters: {
'warehouse_type': warehouse_type
}
}
}
}
},
{
"fieldname": "warehouse_type",