Bladeren bron

[fix] totals in query_report must not be clickable

version-14
Rushabh Mehta 10 jaren geleden
bovenliggende
commit
0da6d32b88
1 gewijzigde bestanden met toevoegingen van 5 en 2 verwijderingen
  1. +5
    -2
      frappe/desk/query_report.py

+ 5
- 2
frappe/desk/query_report.py Bestand weergeven

@@ -126,12 +126,15 @@ def add_total_row(result, columns):
if isinstance(columns[0], basestring):
first_col = columns[0].split(":")
if len(first_col) > 1:
first_col_fieldtype = first_col[1]
first_col_fieldtype = first_col[1].split("/")[0]
else:
first_col_fieldtype = columns[0].get("fieldtype")

if first_col_fieldtype not in ["Currency", "Int", "Float", "Percent"]:
total_row[0] = "Total"
if first_col_fieldtype == "Link":
total_row[0] = "'Total'"
else:
total_row[0] = "Total"

result.append(total_row)
return result


Laden…
Annuleren
Opslaan