diff --git a/erpnext/edi/doctype/code_list/code_list_import.js b/erpnext/edi/doctype/code_list/code_list_import.js index 5e4c190494ee..8531c6784312 100644 --- a/erpnext/edi/doctype/code_list/code_list_import.js +++ b/erpnext/edi/doctype/code_list/code_list_import.js @@ -40,8 +40,10 @@ function show_column_selection_dialog(context) { fieldname: "title_column", label: __("as Title"), fieldtype: "Select", + reqd: 1, options: [null].concat(context.columns), default: context.columns.includes("name") ? "name" : null, + description: __("If source has no separate title column: use code column as title."), }, { fieldname: "code_column", diff --git a/erpnext/edi/doctype/common_code/common_code.json b/erpnext/edi/doctype/common_code/common_code.json index fa34010abb9c..413761c051d7 100644 --- a/erpnext/edi/doctype/common_code/common_code.json +++ b/erpnext/edi/doctype/common_code/common_code.json @@ -29,7 +29,8 @@ "fieldtype": "Data", "in_list_view": 1, "in_standard_filter": 1, - "label": "Title" + "label": "Title", + "reqd": 1 }, { "fieldname": "column_break_wxsw", @@ -70,7 +71,7 @@ } ], "links": [], - "modified": "2024-10-01 13:24:29.299539", + "modified": "2024-10-02 15:43:58.213803", "modified_by": "Administrator", "module": "EDI", "name": "Common Code", @@ -95,4 +96,4 @@ "sort_order": "DESC", "states": [], "title_field": "title" -} +} \ No newline at end of file diff --git a/erpnext/edi/doctype/common_code/common_code.py b/erpnext/edi/doctype/common_code/common_code.py index dfbf39a66aed..48e07f60c2cf 100644 --- a/erpnext/edi/doctype/common_code/common_code.py +++ b/erpnext/edi/doctype/common_code/common_code.py @@ -26,7 +26,7 @@ class CommonCode(Document): code_list: DF.Link common_code: DF.Data description: DF.SmallText | None - title: DF.Data | None + title: DF.Data # end: auto-generated types @staticmethod