Sfoglia il codice sorgente

[fix] permitted documents for user - enclose fieldnames in '`'

version-14
Anand Doshi 10 anni fa
parent
commit
d94a452b26
1 ha cambiato i file con 2 aggiunte e 2 eliminazioni
  1. +2
    -2
      frappe/core/report/permitted_documents_for_user/permitted_documents_for_user.py

+ 2
- 2
frappe/core/report/permitted_documents_for_user/permitted_documents_for_user.py Vedi File

@@ -29,10 +29,10 @@ def validate(user, doctype):

def get_columns_and_fields(doctype):
columns = ["Name:Link/{}:200".format(doctype)]
fields = ["name"]
fields = ["`name`"]
for df in frappe.get_meta(doctype).fields:
if df.in_list_view and df.fieldtype in type_map:
fields.append(df.fieldname)
fields.append("`{0}`".format(df.fieldname))
fieldtype = "Link/{}".format(df.options) if df.fieldtype=="Link" else df.fieldtype
columns.append("{label}:{fieldtype}:{width}".format(label=df.label, fieldtype=fieldtype, width=df.width or 100))



Caricamento…
Annulla
Salva