fix: only allow queue_in_background in customize form
This commit is contained in:
parent
759ee1a116
commit
c3e2cd1629
3 changed files with 11 additions and 18 deletions
|
|
@ -149,6 +149,10 @@ frappe.ui.form.on("Customize Form", {
|
|||
const is_autoname_autoincrement = frm.doc.autoname === "autoincrement";
|
||||
frm.set_df_property("naming_rule", "hidden", is_autoname_autoincrement);
|
||||
frm.set_df_property("autoname", "read_only", is_autoname_autoincrement);
|
||||
frm.toggle_display(
|
||||
["queue_in_background"],
|
||||
frappe.get_meta(frm.doc.doc_type).is_submittable || 0
|
||||
);
|
||||
}
|
||||
|
||||
frm.events.setup_export(frm);
|
||||
|
|
|
|||
|
|
@ -12,7 +12,6 @@
|
|||
"label",
|
||||
"search_fields",
|
||||
"column_break_5",
|
||||
"is_submittable",
|
||||
"istable",
|
||||
"is_calendar_and_gantt",
|
||||
"editable_grid",
|
||||
|
|
@ -344,21 +343,11 @@
|
|||
"label": "Make Attachments Public by Default"
|
||||
},
|
||||
{
|
||||
"default": "0",
|
||||
"depends_on": "eval: doc.is_submittable",
|
||||
"fieldname": "queue_in_background",
|
||||
"fieldtype": "Check",
|
||||
"label": "Queue in Background"
|
||||
},
|
||||
{
|
||||
"default": "0",
|
||||
"depends_on": "eval: doc.is_submittable",
|
||||
"fetch_from": "doc_type.is_submittable",
|
||||
"fieldname": "is_submittable",
|
||||
"fieldtype": "Check",
|
||||
"label": "Is Submittable",
|
||||
"read_only": 1
|
||||
},
|
||||
"default": "0",
|
||||
"fieldname": "queue_in_background",
|
||||
"fieldtype": "Check",
|
||||
"label": "Queue in Background"
|
||||
},
|
||||
{
|
||||
"fieldname": "default_view",
|
||||
"fieldtype": "Select",
|
||||
|
|
@ -385,7 +374,7 @@
|
|||
"index_web_pages_for_search": 1,
|
||||
"issingle": 1,
|
||||
"links": [],
|
||||
"modified": "2022-08-30 11:45:16.772277",
|
||||
"modified": "2022-10-30 23:39:49.628093",
|
||||
"modified_by": "Administrator",
|
||||
"module": "Custom",
|
||||
"name": "Customize Form",
|
||||
|
|
|
|||
|
|
@ -569,9 +569,9 @@ doctype_properties = {
|
|||
"sort_order": "Data",
|
||||
"default_print_format": "Data",
|
||||
"allow_copy": "Check",
|
||||
"is_submittable": "Check",
|
||||
"istable": "Check",
|
||||
"quick_entry": "Check",
|
||||
"queue_in_background": "Check",
|
||||
"editable_grid": "Check",
|
||||
"max_attachments": "Int",
|
||||
"make_attachments_public": "Check",
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue