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", "print_width",
"alignment", "alignment",
"no_copy", "no_copy",
"set_only_once",
"allow_on_submit", "allow_on_submit",
"in_list_view", "in_list_view",
"in_standard_filter", "in_standard_filter",
@ -484,6 +485,12 @@
"fieldtype": "Select", "fieldtype": "Select",
"label": "Button Color", "label": "Button Color",
"options": "\nDefault\nPrimary\nInfo\nSuccess\nWarning\nDanger" "options": "\nDefault\nPrimary\nInfo\nSuccess\nWarning\nDanger"
},
{
"default": "0",
"fieldname": "set_only_once",
"fieldtype": "Check",
"label": "Set only once"
} }
], ],
"grid_page_length": 50, "grid_page_length": 50,
@ -491,7 +498,7 @@
"idx": 1, "idx": 1,
"index_web_pages_for_search": 1, "index_web_pages_for_search": 1,
"links": [], "links": [],
"modified": "2025-11-12 01:14:24.753774", "modified": "2026-03-22 10:35:32.555267",
"modified_by": "Administrator", "modified_by": "Administrator",
"module": "Custom", "module": "Custom",
"name": "Custom Field", "name": "Custom Field",

View file

@ -22,9 +22,9 @@ class CustomField(Document):
if TYPE_CHECKING: if TYPE_CHECKING:
from frappe.types import DF from frappe.types import DF
alignment: DF.Literal["", "Left", "Center", "Right"]
allow_in_quick_entry: DF.Check allow_in_quick_entry: DF.Check
allow_on_submit: DF.Check allow_on_submit: DF.Check
alignment: DF.Literal["", "Left", "Center", "Right"]
bold: DF.Check bold: DF.Check
button_color: DF.Literal["", "Default", "Primary", "Info", "Success", "Warning", "Danger"] button_color: DF.Literal["", "Default", "Primary", "Info", "Success", "Warning", "Danger"]
collapsible: DF.Check collapsible: DF.Check
@ -114,6 +114,7 @@ class CustomField(Document):
report_hide: DF.Check report_hide: DF.Check
reqd: DF.Check reqd: DF.Check
search_index: DF.Check search_index: DF.Check
set_only_once: DF.Check
show_dashboard: DF.Check show_dashboard: DF.Check
sort_options: DF.Check sort_options: DF.Check
translatable: DF.Check translatable: DF.Check

View file

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

View file

@ -22,6 +22,7 @@
"in_preview", "in_preview",
"bold", "bold",
"no_copy", "no_copy",
"set_only_once",
"allow_in_quick_entry", "allow_in_quick_entry",
"translatable", "translatable",
"mask", "mask",
@ -509,6 +510,12 @@
"fieldname": "mask", "fieldname": "mask",
"fieldtype": "Check", "fieldtype": "Check",
"label": "Mask" "label": "Mask"
},
{
"default": "0",
"fieldname": "set_only_once",
"fieldtype": "Check",
"label": "Set only once"
} }
], ],
"grid_page_length": 50, "grid_page_length": 50,
@ -516,7 +523,7 @@
"index_web_pages_for_search": 1, "index_web_pages_for_search": 1,
"istable": 1, "istable": 1,
"links": [], "links": [],
"modified": "2025-12-23 14:17:10.458916", "modified": "2026-03-22 10:36:12.968197",
"modified_by": "Administrator", "modified_by": "Administrator",
"module": "Custom", "module": "Custom",
"name": "Customize Form Field", "name": "Customize Form Field",

View file

@ -13,10 +13,10 @@ class CustomizeFormField(Document):
if TYPE_CHECKING: if TYPE_CHECKING:
from frappe.types import DF from frappe.types import DF
alignment: DF.Literal["", "Left", "Center", "Right"]
allow_bulk_edit: DF.Check allow_bulk_edit: DF.Check
allow_in_quick_entry: DF.Check allow_in_quick_entry: DF.Check
allow_on_submit: DF.Check allow_on_submit: DF.Check
alignment: DF.Literal["", "Left", "Center", "Right"]
bold: DF.Check bold: DF.Check
button_color: DF.Literal["", "Default", "Primary", "Info", "Success", "Warning", "Danger"] button_color: DF.Literal["", "Default", "Primary", "Info", "Success", "Warning", "Danger"]
collapsible: DF.Check collapsible: DF.Check
@ -109,6 +109,7 @@ class CustomizeFormField(Document):
remember_last_selected_value: DF.Check remember_last_selected_value: DF.Check
report_hide: DF.Check report_hide: DF.Check
reqd: DF.Check reqd: DF.Check
set_only_once: DF.Check
show_dashboard: DF.Check show_dashboard: DF.Check
sort_options: DF.Check sort_options: DF.Check
translatable: DF.Check translatable: DF.Check