Sfoglia il codice sorgente

[fix] totals in query_report must not be clickable

version-14
Rushabh Mehta 10 anni fa
parent
commit
0da6d32b88
1 ha cambiato i file con 5 aggiunte e 2 eliminazioni
  1. +5
    -2
      frappe/desk/query_report.py

+ 5
- 2
frappe/desk/query_report.py Vedi File

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


if first_col_fieldtype not in ["Currency", "Int", "Float", "Percent"]: 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) result.append(total_row)
return result return result


Caricamento…
Annulla
Salva