Skip to content

Commit

Permalink
fix(edi-import): require title on common code
Browse files Browse the repository at this point in the history
  • Loading branch information
blaggacao committed Oct 2, 2024
1 parent 94bd743 commit db3cdc7
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 4 deletions.
2 changes: 2 additions & 0 deletions erpnext/edi/doctype/code_list/code_list_import.js
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
7 changes: 4 additions & 3 deletions erpnext/edi/doctype/common_code/common_code.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,8 @@
"fieldtype": "Data",
"in_list_view": 1,
"in_standard_filter": 1,
"label": "Title"
"label": "Title",
"reqd": 1
},
{
"fieldname": "column_break_wxsw",
Expand Down Expand Up @@ -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",
Expand All @@ -95,4 +96,4 @@
"sort_order": "DESC",
"states": [],
"title_field": "title"
}
}
2 changes: 1 addition & 1 deletion erpnext/edi/doctype/common_code/common_code.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit db3cdc7

Please sign in to comment.