Преглед на файлове

In list view property not allowed to no-value-fields

version-14
Nabin Hait преди 10 години
родител
ревизия
1a8055112e
променени са 1 файла, в които са добавени 6 реда и са изтрити 0 реда
  1. +6
    -0
      frappe/custom/doctype/customize_form/customize_form.py

+ 6
- 0
frappe/custom/doctype/customize_form/customize_form.py Целия файл

@@ -10,6 +10,7 @@ import frappe, json
from frappe import _
from frappe.utils import cint
from frappe.model.document import Document
from frappe.model import no_value_fields
from frappe.core.doctype.doctype.doctype import validate_fields_for_doctype

class CustomizeForm(Document):
@@ -124,6 +125,11 @@ class CustomizeForm(Document):
frappe.msgprint(_("Row {0}: Not allowed to enable Allow on Submit for standard fields")\
.format(df.idx))
continue
elif property == "in_list_view" and df.get(property) \
and df.fieldtype!="Image" and df.fieldtype in no_value_fields:
frappe.msgprint(_("'In List View' not allowed for type {0} in row {1}")
.format(df.fieldtype, df.idx))
continue

elif property == "precision" and cint(df.get("precision")) > 6 \
and cint(df.get("precision")) > cint(meta_df[0].get("precision")):


Зареждане…
Отказ
Запис