浏览代码

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

version-14
Anand Doshi 10 年前
父节点
当前提交
d94a452b26
共有 1 个文件被更改,包括 2 次插入2 次删除
  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 查看文件

@@ -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))



正在加载...
取消
保存