fix: add set_only_once property to custom field and customize form

This commit is contained in:
UmakanthKaspa 2026-03-22 10:48:03 +05:30
parent b60a980fd4
commit 22a8d8dd66
5 changed files with 21 additions and 4 deletions

View file

@ -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",

View file

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

View file

@ -810,6 +810,7 @@ docfield_properties = {
"placeholder": "Data",
"button_color": "Select",
"mask": "Check",
"set_only_once": "Check",
}
doctype_link_properties = {

View file

@ -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",

View file

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