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