fix: html download of auto download report broken
This commit is contained in:
parent
aead9aef26
commit
64f3887dce
1 changed files with 10 additions and 1 deletions
|
|
@ -81,7 +81,7 @@ class AutoEmailReport(Document):
|
|||
|
||||
if self.format == 'HTML':
|
||||
columns, data = make_links(columns, data)
|
||||
|
||||
columns = update_field_types(columns)
|
||||
return self.get_html_table(columns, data)
|
||||
|
||||
elif self.format == 'XLSX':
|
||||
|
|
@ -236,5 +236,14 @@ def make_links(columns, data):
|
|||
elif col.fieldtype == "Dynamic Link":
|
||||
if col.options and row.get(col.fieldname) and row.get(col.options):
|
||||
row[col.fieldname] = get_link_to_form(row[col.options], row[col.fieldname])
|
||||
elif col.fieldtype == "Currency":
|
||||
row[col.fieldname] = frappe.format_value(row[col.fieldname], col)
|
||||
|
||||
return columns, data
|
||||
|
||||
def update_field_types(columns):
|
||||
for col in columns:
|
||||
if col.fieldtype in ("Link", "Dynamic Link", "Currency") and col.options != "Currency":
|
||||
col.fieldtype = "Data"
|
||||
col.options = ""
|
||||
return columns
|
||||
Loading…
Add table
Reference in a new issue