diff --git a/frappe/custom/doctype/customize_form/customize_form.py b/frappe/custom/doctype/customize_form/customize_form.py index 92a540447f..f1b6ab40ed 100644 --- a/frappe/custom/doctype/customize_form/customize_form.py +++ b/frappe/custom/doctype/customize_form/customize_form.py @@ -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', diff --git a/frappe/custom/doctype/customize_form/test_customize_form.py b/frappe/custom/doctype/customize_form/test_customize_form.py index d131f06127..2cae69ca21 100644 --- a/frappe/custom/doctype/customize_form/test_customize_form.py +++ b/frappe/custom/doctype/customize_form/test_customize_form.py @@ -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") diff --git a/frappe/custom/doctype/customize_form_field/customize_form_field.json b/frappe/custom/doctype/customize_form_field/customize_form_field.json index 4351e76609..5906cd3bcf 100644 --- a/frappe/custom/doctype/customize_form_field/customize_form_field.json +++ b/frappe/custom/doctype/customize_form_field/customize_form_field.json @@ -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": [] -} \ No newline at end of file +}