Skip to content

Commit

Permalink
feat: add optional code list URL
Browse files Browse the repository at this point in the history
  • Loading branch information
blaggacao committed Oct 1, 2024
1 parent 454518b commit 05d0fd1
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
9 changes: 8 additions & 1 deletion erpnext/edi/doctype/code_list/code_list.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
"field_order": [
"title",
"canonical_uri",
"url",
"column_break_nkls",
"version",
"publisher",
Expand Down Expand Up @@ -59,6 +60,12 @@
"fieldtype": "Data",
"in_standard_filter": 1,
"label": "Publisher ID"
},
{
"fieldname": "url",
"fieldtype": "Data",
"label": "URL",
"options": "URL"
}
],
"index_web_pages_for_search": 1,
Expand All @@ -68,7 +75,7 @@
"link_fieldname": "code_list"
}
],
"modified": "2024-10-01 12:07:33.187252",
"modified": "2024-10-01 12:32:27.990888",
"modified_by": "Administrator",
"module": "EDI",
"name": "Code List",
Expand Down
2 changes: 2 additions & 0 deletions erpnext/edi/doctype/code_list/code_list.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ class CodeList(Document):
publisher: DF.Data | None
publisher_id: DF.Data | None
title: DF.Data | None
url: DF.Data | None
version: DF.Data | None
# end: auto-generated types

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

self.save()

Expand Down

0 comments on commit 05d0fd1

Please sign in to comment.