From f9141d04bf4450f32c06d0e2e08fe85b61da8da4 Mon Sep 17 00:00:00 2001 From: David Arnold Date: Tue, 21 Nov 2023 17:54:17 +0100 Subject: [PATCH] fix(naming_rule): polish list view --- .../doctype/document_naming_rule/document_naming_rule.json | 7 +++++-- .../document_naming_rule/document_naming_rule_list.js | 3 +++ 2 files changed, 8 insertions(+), 2 deletions(-) create mode 100644 frappe/core/doctype/document_naming_rule/document_naming_rule_list.js diff --git a/frappe/core/doctype/document_naming_rule/document_naming_rule.json b/frappe/core/doctype/document_naming_rule/document_naming_rule.json index 1e2247c250..f6b3245086 100644 --- a/frappe/core/doctype/document_naming_rule/document_naming_rule.json +++ b/frappe/core/doctype/document_naming_rule/document_naming_rule.json @@ -35,6 +35,7 @@ { "fieldname": "prefix", "fieldtype": "Data", + "in_list_view": 1, "label": "Prefix", "mandatory_depends_on": "eval:doc.naming_by===\"Numbered\"", "reqd": 1 @@ -44,6 +45,7 @@ "description": "Warning: Updating counter may lead to document name conflicts if not done properly", "fieldname": "counter", "fieldtype": "Int", + "in_list_view": 1, "label": "Counter", "no_copy": 1 }, @@ -78,6 +80,7 @@ "description": "Rules with higher priority number will be applied first.", "fieldname": "priority", "fieldtype": "Int", + "in_standard_filter": 1, "label": "Priority" }, { @@ -87,7 +90,7 @@ ], "index_web_pages_for_search": 1, "links": [], - "modified": "2023-04-24 15:14:32.054272", + "modified": "2023-11-21 11:58:25.712375", "modified_by": "Administrator", "module": "Core", "name": "Document Naming Rule", @@ -107,7 +110,7 @@ } ], "quick_entry": 1, - "sort_field": "modified", + "sort_field": "priority", "sort_order": "DESC", "states": [], "title_field": "document_type", diff --git a/frappe/core/doctype/document_naming_rule/document_naming_rule_list.js b/frappe/core/doctype/document_naming_rule/document_naming_rule_list.js new file mode 100644 index 0000000000..0dba534891 --- /dev/null +++ b/frappe/core/doctype/document_naming_rule/document_naming_rule_list.js @@ -0,0 +1,3 @@ +frappe.listview_settings["Document Naming Rule"] = { + hide_name_column: true, +};