fix: Make status filter optional (#28126)

This commit is contained in:
Ganga Manoj 2021-10-29 18:07:11 +05:30 committed by GitHub
parent eb720d18c3
commit 15e9b5170d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 8 additions and 8 deletions

View File

@ -16,9 +16,8 @@ frappe.query_reports["Fixed Asset Register"] = {
fieldname:"status", fieldname:"status",
label: __("Status"), label: __("Status"),
fieldtype: "Select", fieldtype: "Select",
options: "In Location\nDisposed", options: "\nIn Location\nDisposed",
default: 'In Location', default: 'In Location'
reqd: 1
}, },
{ {
"fieldname":"filter_based_on", "fieldname":"filter_based_on",

View File

@ -45,6 +45,7 @@ def get_conditions(filters):
if filters.get('cost_center'): if filters.get('cost_center'):
conditions["cost_center"] = filters.get('cost_center') conditions["cost_center"] = filters.get('cost_center')
if status:
# In Store assets are those that are not sold or scrapped # In Store assets are those that are not sold or scrapped
operand = 'not in' operand = 'not in'
if status not in 'In Location': if status not in 'In Location':