Skip to content

Commit 41532b8

Browse files
committed
feat: add optional code list URL
1 parent 454518b commit 41532b8

File tree

2 files changed

+9
-1
lines changed

2 files changed

+9
-1
lines changed

erpnext/edi/doctype/code_list/code_list.json

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
"field_order": [
1010
"title",
1111
"canonical_uri",
12+
"url",
1213
"column_break_nkls",
1314
"version",
1415
"publisher",
@@ -59,6 +60,11 @@
5960
"fieldtype": "Data",
6061
"in_standard_filter": 1,
6162
"label": "Publisher ID"
63+
},
64+
{
65+
"fieldname": "url",
66+
"fieldtype": "Data",
67+
"label": "URL"
6268
}
6369
],
6470
"index_web_pages_for_search": 1,
@@ -68,7 +74,7 @@
6874
"link_fieldname": "code_list"
6975
}
7076
],
71-
"modified": "2024-10-01 12:07:33.187252",
77+
"modified": "2024-10-01 12:30:20.242033",
7278
"modified_by": "Administrator",
7379
"module": "EDI",
7480
"name": "Code List",

erpnext/edi/doctype/code_list/code_list.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ class CodeList(Document):
2222
publisher: DF.Data | None
2323
publisher_id: DF.Data | None
2424
title: DF.Data | None
25+
url: DF.Data | None
2526
version: DF.Data | None
2627
# end: auto-generated types
2728

@@ -74,6 +75,7 @@ def import_genericode(self, file_path, code_column, title_column=None, filters=N
7475
if not self.publisher:
7576
self.publisher = getattr(root.find(".//Identification/Agency/LongName"), "text", None)
7677
self.publisher_id = getattr(root.find(".//Identification/Agency/Identifier"), "text", None)
78+
self.url = getattr(root.find(".//Identification/LocationUri"), "text", None)
7779

7880
self.save()
7981

0 commit comments

Comments
 (0)