From df2be697e95e6826ea69fa3d7790517fd880a1c1 Mon Sep 17 00:00:00 2001 From: Geethu k Date: Thu, 2 Nov 2023 11:35:59 +0530 Subject: [PATCH] feat:Add child table for category in smith --- aumms/aumms/doctype/smith/smith.json | 10 ++--- .../doctype/smith_categories/__init__.py | 0 .../smith_categories/smith_categories.json | 40 +++++++++++++++++++ .../smith_categories/smith_categories.py | 8 ++++ .../smith_category/smith_category.json | 10 ++++- 5 files changed, 61 insertions(+), 7 deletions(-) create mode 100644 aumms/aumms/doctype/smith_categories/__init__.py create mode 100644 aumms/aumms/doctype/smith_categories/smith_categories.json create mode 100644 aumms/aumms/doctype/smith_categories/smith_categories.py diff --git a/aumms/aumms/doctype/smith/smith.json b/aumms/aumms/doctype/smith/smith.json index 21d9c149..d793f5ca 100644 --- a/aumms/aumms/doctype/smith/smith.json +++ b/aumms/aumms/doctype/smith/smith.json @@ -18,9 +18,9 @@ "warehouse", "department", "head_of_smith", - "category", + "hourly_rate", "section_break_9mmii", - "hourly_rate" + "category" ], "fields": [ { @@ -92,9 +92,9 @@ }, { "fieldname": "category", - "fieldtype": "Link", + "fieldtype": "Table", "label": "Category", - "options": "Smith Category" + "options": "Smith Categories" }, { "fieldname": "smith_grade", @@ -105,7 +105,7 @@ ], "index_web_pages_for_search": 1, "links": [], - "modified": "2023-10-26 12:11:32.737297", + "modified": "2023-11-02 10:57:11.184968", "modified_by": "Administrator", "module": "AuMMS", "name": "Smith", diff --git a/aumms/aumms/doctype/smith_categories/__init__.py b/aumms/aumms/doctype/smith_categories/__init__.py new file mode 100644 index 00000000..e69de29b diff --git a/aumms/aumms/doctype/smith_categories/smith_categories.json b/aumms/aumms/doctype/smith_categories/smith_categories.json new file mode 100644 index 00000000..94723018 --- /dev/null +++ b/aumms/aumms/doctype/smith_categories/smith_categories.json @@ -0,0 +1,40 @@ +{ + "actions": [], + "allow_rename": 1, + "creation": "2023-11-02 10:54:41.645318", + "doctype": "DocType", + "editable_grid": 1, + "engine": "InnoDB", + "field_order": [ + "smith_category", + "description" + ], + "fields": [ + { + "fieldname": "smith_category", + "fieldtype": "Link", + "in_list_view": 1, + "label": " Smith Category", + "options": "Smith Category" + }, + { + "fetch_from": "smith_category.description", + "fieldname": "description", + "fieldtype": "Small Text", + "in_list_view": 1, + "label": "Description" + } + ], + "index_web_pages_for_search": 1, + "istable": 1, + "links": [], + "modified": "2023-11-02 11:01:06.776369", + "modified_by": "Administrator", + "module": "AuMMS", + "name": "Smith Categories", + "owner": "Administrator", + "permissions": [], + "sort_field": "modified", + "sort_order": "DESC", + "states": [] +} \ No newline at end of file diff --git a/aumms/aumms/doctype/smith_categories/smith_categories.py b/aumms/aumms/doctype/smith_categories/smith_categories.py new file mode 100644 index 00000000..14a171a3 --- /dev/null +++ b/aumms/aumms/doctype/smith_categories/smith_categories.py @@ -0,0 +1,8 @@ +# Copyright (c) 2023, efeone and contributors +# For license information, please see license.txt + +# import frappe +from frappe.model.document import Document + +class SmithCategories(Document): + pass diff --git a/aumms/aumms/doctype/smith_category/smith_category.json b/aumms/aumms/doctype/smith_category/smith_category.json index 7bc690bb..029517f5 100644 --- a/aumms/aumms/doctype/smith_category/smith_category.json +++ b/aumms/aumms/doctype/smith_category/smith_category.json @@ -8,7 +8,8 @@ "editable_grid": 1, "engine": "InnoDB", "field_order": [ - "categories" + "categories", + "description" ], "fields": [ { @@ -16,11 +17,16 @@ "fieldtype": "Data", "label": "Categories", "unique": 1 + }, + { + "fieldname": "description", + "fieldtype": "Small Text", + "label": "Description" } ], "index_web_pages_for_search": 1, "links": [], - "modified": "2023-10-26 11:20:55.759872", + "modified": "2023-11-02 11:25:39.363869", "modified_by": "Administrator", "module": "AuMMS", "name": "Smith Category",