[minor] ignore permissions for bin on warehouse_query (#8713)

This commit is contained in:
Rushabh Mehta 2017-05-06 12:44:03 +05:30 committed by Nabin Hait
parent 51cd2df763
commit b7e740ff45

View File

@ -360,7 +360,8 @@ def warehouse_query(doctype, txt, searchfield, start, page_len, filters):
sub_query = """ select round(`tabBin`.actual_qty, 2) from `tabBin`
where `tabBin`.warehouse = `tabWarehouse`.name
{bin_conditions} """.format(
bin_conditions=get_filters_cond(doctype, filter_dict.get("Bin"), bin_conditions))
bin_conditions=get_filters_cond(doctype, filter_dict.get("Bin"), bin_conditions),
ignore_permissions=True)
response = frappe.db.sql("""select `tabWarehouse`.name,
CONCAT_WS(" : ", "Actual Qty", ifnull( ({sub_query}), 0) ) as actual_qty