[fix] query report - if not fieldname, use label

This commit is contained in:
Anand Doshi 2015-07-30 18:00:30 +05:30
parent 2b9861b9da
commit b19d703ed0

View file

@ -258,11 +258,13 @@ def get_columns_dict(columns):
else:
col_dict["fieldtype"] = col[1]
col_dict["fieldname"] = col[0].lower()
col_dict["fieldname"] = frappe.scrub(col[0])
# dict
else:
col_dict.update(col)
if "fieldname" not in col_dict:
col_dict["fieldname"] = frappe.scrub(col_dict["label"])
columns_dict[idx] = col_dict
columns_dict[col_dict["fieldname"]] = col_dict