diff --git a/frappe/custom/doctype/custom_field/custom_field.json b/frappe/custom/doctype/custom_field/custom_field.json index aba6e4be1f..ec132dd019 100644 --- a/frappe/custom/doctype/custom_field/custom_field.json +++ b/frappe/custom/doctype/custom_field/custom_field.json @@ -48,6 +48,7 @@ "print_width", "alignment", "no_copy", + "set_only_once", "allow_on_submit", "in_list_view", "in_standard_filter", @@ -484,6 +485,12 @@ "fieldtype": "Select", "label": "Button Color", "options": "\nDefault\nPrimary\nInfo\nSuccess\nWarning\nDanger" + }, + { + "default": "0", + "fieldname": "set_only_once", + "fieldtype": "Check", + "label": "Set only once" } ], "grid_page_length": 50, @@ -491,7 +498,7 @@ "idx": 1, "index_web_pages_for_search": 1, "links": [], - "modified": "2025-11-12 01:14:24.753774", + "modified": "2026-03-22 10:35:32.555267", "modified_by": "Administrator", "module": "Custom", "name": "Custom Field", diff --git a/frappe/custom/doctype/custom_field/custom_field.py b/frappe/custom/doctype/custom_field/custom_field.py index 1ad9b98d60..41e86656e9 100644 --- a/frappe/custom/doctype/custom_field/custom_field.py +++ b/frappe/custom/doctype/custom_field/custom_field.py @@ -22,9 +22,9 @@ class CustomField(Document): if TYPE_CHECKING: from frappe.types import DF + alignment: DF.Literal["", "Left", "Center", "Right"] allow_in_quick_entry: DF.Check allow_on_submit: DF.Check - alignment: DF.Literal["", "Left", "Center", "Right"] bold: DF.Check button_color: DF.Literal["", "Default", "Primary", "Info", "Success", "Warning", "Danger"] collapsible: DF.Check @@ -114,6 +114,7 @@ class CustomField(Document): report_hide: DF.Check reqd: DF.Check search_index: DF.Check + set_only_once: DF.Check show_dashboard: DF.Check sort_options: DF.Check translatable: DF.Check diff --git a/frappe/custom/doctype/customize_form/customize_form.py b/frappe/custom/doctype/customize_form/customize_form.py index d631faff01..472a80c6a7 100644 --- a/frappe/custom/doctype/customize_form/customize_form.py +++ b/frappe/custom/doctype/customize_form/customize_form.py @@ -810,6 +810,7 @@ docfield_properties = { "placeholder": "Data", "button_color": "Select", "mask": "Check", + "set_only_once": "Check", } doctype_link_properties = { 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 6976cbe0f9..3e658738bf 100644 --- a/frappe/custom/doctype/customize_form_field/customize_form_field.json +++ b/frappe/custom/doctype/customize_form_field/customize_form_field.json @@ -22,6 +22,7 @@ "in_preview", "bold", "no_copy", + "set_only_once", "allow_in_quick_entry", "translatable", "mask", @@ -509,6 +510,12 @@ "fieldname": "mask", "fieldtype": "Check", "label": "Mask" + }, + { + "default": "0", + "fieldname": "set_only_once", + "fieldtype": "Check", + "label": "Set only once" } ], "grid_page_length": 50, @@ -516,7 +523,7 @@ "index_web_pages_for_search": 1, "istable": 1, "links": [], - "modified": "2025-12-23 14:17:10.458916", + "modified": "2026-03-22 10:36:12.968197", "modified_by": "Administrator", "module": "Custom", "name": "Customize Form Field", diff --git a/frappe/custom/doctype/customize_form_field/customize_form_field.py b/frappe/custom/doctype/customize_form_field/customize_form_field.py index fcd28b9439..bd4d46ffe7 100644 --- a/frappe/custom/doctype/customize_form_field/customize_form_field.py +++ b/frappe/custom/doctype/customize_form_field/customize_form_field.py @@ -13,10 +13,10 @@ class CustomizeFormField(Document): if TYPE_CHECKING: from frappe.types import DF + alignment: DF.Literal["", "Left", "Center", "Right"] allow_bulk_edit: DF.Check allow_in_quick_entry: DF.Check allow_on_submit: DF.Check - alignment: DF.Literal["", "Left", "Center", "Right"] bold: DF.Check button_color: DF.Literal["", "Default", "Primary", "Info", "Success", "Warning", "Danger"] collapsible: DF.Check @@ -109,6 +109,7 @@ class CustomizeFormField(Document): remember_last_selected_value: DF.Check report_hide: DF.Check reqd: DF.Check + set_only_once: DF.Check show_dashboard: DF.Check sort_options: DF.Check translatable: DF.Check