HENRY Florian 3 yıl önce
committed by GitHub
ebeveyn
işleme
8b2591e266
Veri tabanında bu imza için bilinen anahtar bulunamadı GPG Anahtar Kimliği: 4AEE18F83AFDEB23
3 değiştirilmiş dosya ile 15 ekleme ve 2 silme
  1. +1
    -0
      frappe/custom/doctype/customize_form/customize_form.py
  2. +5
    -0
      frappe/custom/doctype/customize_form/test_customize_form.py
  3. +9
    -2
      frappe/custom/doctype/customize_form_field/customize_form_field.json

+ 1
- 0
frappe/custom/doctype/customize_form/customize_form.py Dosyayı Görüntüle

@@ -540,6 +540,7 @@ docfield_properties = {
'in_global_search': 'Check',
'in_preview': 'Check',
'bold': 'Check',
'no_copy': 'Check',
'hidden': 'Check',
'collapsible': 'Check',
'collapsible_depends_on': 'Data',


+ 5
- 0
frappe/custom/doctype/customize_form/test_customize_form.py Dosyayı Görüntüle

@@ -97,13 +97,18 @@ class TestCustomizeForm(unittest.TestCase):

custom_field = d.get("fields", {"fieldname": "test_custom_field"})[0]
custom_field.reqd = 1
custom_field.no_copy = 1
d.run_method("save_customization")
self.assertEqual(frappe.db.get_value("Custom Field", "Event-test_custom_field", "reqd"), 1)
self.assertEqual(frappe.db.get_value("Custom Field", "Event-test_custom_field", "no_copy"), 1)

custom_field = d.get("fields", {"is_custom_field": True})[0]
custom_field.reqd = 0
custom_field.no_copy = 0
d.run_method("save_customization")
self.assertEqual(frappe.db.get_value("Custom Field", "Event-test_custom_field", "reqd"), 0)
self.assertEqual(frappe.db.get_value("Custom Field", "Event-test_custom_field", "no_copy"), 0)


def test_save_customization_new_field(self):
d = self.get_customize_form("Event")


+ 9
- 2
frappe/custom/doctype/customize_form_field/customize_form_field.json Dosyayı Görüntüle

@@ -20,6 +20,7 @@
"in_global_search",
"in_preview",
"bold",
"no_copy",
"allow_in_quick_entry",
"translatable",
"column_break_7",
@@ -437,13 +438,19 @@
"fieldname": "show_dashboard",
"fieldtype": "Check",
"label": "Show Dashboard"
},
{
"default": "0",
"fieldname": "no_copy",
"fieldtype": "Check",
"label": "No Copy"
}
],
"idx": 1,
"index_web_pages_for_search": 1,
"istable": 1,
"links": [],
"modified": "2022-01-27 21:45:22.349776",
"modified": "2022-02-08 19:38:16.111199",
"modified_by": "Administrator",
"module": "Custom",
"name": "Customize Form Field",
@@ -453,4 +460,4 @@
"sort_field": "modified",
"sort_order": "ASC",
"states": []
}
}

Yükleniyor…
İptal
Kaydet