Merge pull request #7325 from deepeshgarg007/custom-link-develop

fix(query_report): Link field fixes for custom reports
This commit is contained in:
Deepesh Garg 2019-04-21 22:31:19 +05:30 committed by GitHub
commit 63508953f2
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 1 deletions

View file

@ -224,7 +224,7 @@ def add_data_to_custom_columns(columns, result):
fieldname = column['fieldname']
key = (column['doctype'], fieldname)
link_field = column['link_field']
row[fieldname] = custom_fields_data.get(key, {}).get(row[link_field])
row[fieldname] = custom_fields_data.get(key, {}).get(row.get(link_field))
return data

View file

@ -1014,6 +1014,7 @@ frappe.views.QueryReport = class QueryReport extends frappe.views.BaseList {
label: df.label,
link_field: this.doctype_field_map[values.doctype],
doctype: values.doctype,
options: df.fieldtype === "Link" ? values.doctype : undefined,
width: 100
});