From 0798926d24d3e2ee383ced2e83d5d8cc367d25a2 Mon Sep 17 00:00:00 2001 From: Jordi Albert <63541019+jarg1023@users.noreply.github.com> Date: Mon, 5 Sep 2022 15:53:35 +0200 Subject: [PATCH 1/2] #13 | Export customization for ToDO Doctype to add custom relations with MSP Doctypes --- msp/msp/custom/todo.json | 308 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 308 insertions(+) create mode 100644 msp/msp/custom/todo.json diff --git a/msp/msp/custom/todo.json b/msp/msp/custom/todo.json new file mode 100644 index 0000000..80fe3f8 --- /dev/null +++ b/msp/msp/custom/todo.json @@ -0,0 +1,308 @@ +{ + "custom_fields": [ + { + "_assign": null, + "_comments": null, + "_liked_by": null, + "_user_tags": null, + "allow_in_quick_entry": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 0, + "collapsible_depends_on": null, + "columns": 0, + "creation": "2022-09-05 12:52:53.000762", + "default": null, + "depends_on": null, + "description": null, + "docstatus": 0, + "dt": "ToDo", + "fetch_from": null, + "fetch_if_empty": 0, + "fieldname": "ip_network", + "fieldtype": "Link", + "hidden": 0, + "hide_border": 0, + "hide_days": 0, + "hide_seconds": 0, + "idx": 19, + "ignore_user_permissions": 0, + "ignore_xss_filter": 0, + "in_global_search": 0, + "in_list_view": 0, + "in_preview": 0, + "in_standard_filter": 0, + "insert_after": "assignment_rule", + "label": "IP Network", + "length": 0, + "mandatory_depends_on": null, + "modified": "2022-09-05 12:52:53.000762", + "modified_by": "Administrator", + "name": "ToDo-ip_network", + "no_copy": 0, + "non_negative": 0, + "options": "IP Network", + "owner": "Administrator", + "parent": null, + "parentfield": null, + "parenttype": null, + "permlevel": 0, + "precision": "", + "print_hide": 0, + "print_hide_if_no_value": 0, + "print_width": null, + "read_only": 0, + "read_only_depends_on": null, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "translatable": 0, + "unique": 0, + "width": null + }, + { + "_assign": null, + "_comments": null, + "_liked_by": null, + "_user_tags": null, + "allow_in_quick_entry": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 0, + "collapsible_depends_on": null, + "columns": 0, + "creation": "2022-09-05 12:56:53.645299", + "default": null, + "depends_on": null, + "description": null, + "docstatus": 0, + "dt": "ToDo", + "fetch_from": null, + "fetch_if_empty": 0, + "fieldname": "it_landscape", + "fieldtype": "Link", + "hidden": 0, + "hide_border": 0, + "hide_days": 0, + "hide_seconds": 0, + "idx": 20, + "ignore_user_permissions": 0, + "ignore_xss_filter": 0, + "in_global_search": 0, + "in_list_view": 0, + "in_preview": 0, + "in_standard_filter": 0, + "insert_after": "ip_network", + "label": "IT Landscape", + "length": 0, + "mandatory_depends_on": null, + "modified": "2022-09-05 12:56:53.645299", + "modified_by": "Administrator", + "name": "ToDo-it_landscape", + "no_copy": 0, + "non_negative": 0, + "options": "IT Landscape", + "owner": "Administrator", + "parent": null, + "parentfield": null, + "parenttype": null, + "permlevel": 0, + "precision": "", + "print_hide": 0, + "print_hide_if_no_value": 0, + "print_width": null, + "read_only": 0, + "read_only_depends_on": null, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "translatable": 0, + "unique": 0, + "width": null + }, + { + "_assign": null, + "_comments": null, + "_liked_by": null, + "_user_tags": null, + "allow_in_quick_entry": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 0, + "collapsible_depends_on": null, + "columns": 0, + "creation": "2022-09-05 12:56:53.920916", + "default": null, + "depends_on": null, + "description": null, + "docstatus": 0, + "dt": "ToDo", + "fetch_from": null, + "fetch_if_empty": 0, + "fieldname": "it_object", + "fieldtype": "Link", + "hidden": 0, + "hide_border": 0, + "hide_days": 0, + "hide_seconds": 0, + "idx": 21, + "ignore_user_permissions": 0, + "ignore_xss_filter": 0, + "in_global_search": 0, + "in_list_view": 0, + "in_preview": 0, + "in_standard_filter": 0, + "insert_after": "it_landscape", + "label": "IT Object", + "length": 0, + "mandatory_depends_on": null, + "modified": "2022-09-05 12:56:53.920916", + "modified_by": "Administrator", + "name": "ToDo-it_object", + "no_copy": 0, + "non_negative": 0, + "options": "IT Object", + "owner": "Administrator", + "parent": null, + "parentfield": null, + "parenttype": null, + "permlevel": 0, + "precision": "", + "print_hide": 0, + "print_hide_if_no_value": 0, + "print_width": null, + "read_only": 0, + "read_only_depends_on": null, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "translatable": 0, + "unique": 0, + "width": null + }, + { + "_assign": null, + "_comments": null, + "_liked_by": null, + "_user_tags": null, + "allow_in_quick_entry": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 0, + "collapsible_depends_on": null, + "columns": 0, + "creation": "2022-09-05 12:56:54.064975", + "default": null, + "depends_on": null, + "description": null, + "docstatus": 0, + "dt": "ToDo", + "fetch_from": null, + "fetch_if_empty": 0, + "fieldname": "ip_address", + "fieldtype": "Link", + "hidden": 0, + "hide_border": 0, + "hide_days": 0, + "hide_seconds": 0, + "idx": 22, + "ignore_user_permissions": 0, + "ignore_xss_filter": 0, + "in_global_search": 0, + "in_list_view": 0, + "in_preview": 0, + "in_standard_filter": 0, + "insert_after": "it_object", + "label": "IP Address", + "length": 0, + "mandatory_depends_on": null, + "modified": "2022-09-05 12:56:54.064975", + "modified_by": "Administrator", + "name": "ToDo-ip_address", + "no_copy": 0, + "non_negative": 0, + "options": "IP Address", + "owner": "Administrator", + "parent": null, + "parentfield": null, + "parenttype": null, + "permlevel": 0, + "precision": "", + "print_hide": 0, + "print_hide_if_no_value": 0, + "print_width": null, + "read_only": 0, + "read_only_depends_on": null, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "translatable": 0, + "unique": 0, + "width": null + }, + { + "_assign": null, + "_comments": null, + "_liked_by": null, + "_user_tags": null, + "allow_in_quick_entry": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 0, + "collapsible_depends_on": null, + "columns": 0, + "creation": "2022-09-05 13:10:58.880444", + "default": null, + "depends_on": null, + "description": null, + "docstatus": 0, + "dt": "ToDo", + "fetch_from": null, + "fetch_if_empty": 0, + "fieldname": "it_user_account", + "fieldtype": "Link", + "hidden": 0, + "hide_border": 0, + "hide_days": 0, + "hide_seconds": 0, + "idx": 22, + "ignore_user_permissions": 0, + "ignore_xss_filter": 0, + "in_global_search": 0, + "in_list_view": 0, + "in_preview": 0, + "in_standard_filter": 0, + "insert_after": "ip_address", + "label": "IT User Account", + "length": 0, + "mandatory_depends_on": null, + "modified": "2022-09-05 13:10:58.880444", + "modified_by": "Administrator", + "name": "ToDo-it_user_account", + "no_copy": 0, + "non_negative": 0, + "options": "IT User Account", + "owner": "Administrator", + "parent": null, + "parentfield": null, + "parenttype": null, + "permlevel": 0, + "precision": "", + "print_hide": 0, + "print_hide_if_no_value": 0, + "print_width": null, + "read_only": 0, + "read_only_depends_on": null, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "translatable": 0, + "unique": 0, + "width": null + } + ], + "custom_perms": [], + "doctype": "ToDo", + "property_setters": [], + "sync_on_migrate": 1 +} \ No newline at end of file From db36f11633f01d44efbbae6c179af52cc53bb076 Mon Sep 17 00:00:00 2001 From: Jordi Albert <63541019+jarg1023@users.noreply.github.com> Date: Mon, 5 Sep 2022 15:54:28 +0200 Subject: [PATCH 2/2] #13 | Add relation to ToDo Doctype in dashboards information and create needed dashboards --- msp/msp/doctype/ip_address/ip_address_dashboard.py | 14 ++++++++++++++ msp/msp/doctype/ip_network/ip_network_dashboard.py | 4 ++++ .../doctype/it_landscape/it_landscape_dashboard.py | 2 +- msp/msp/doctype/it_object/it_object_dashboard.py | 14 ++++++++++++++ .../it_user_account/it_user_account_dashboard.py | 14 ++++++++++++++ 5 files changed, 47 insertions(+), 1 deletion(-) create mode 100644 msp/msp/doctype/ip_address/ip_address_dashboard.py create mode 100644 msp/msp/doctype/it_object/it_object_dashboard.py create mode 100644 msp/msp/doctype/it_user_account/it_user_account_dashboard.py diff --git a/msp/msp/doctype/ip_address/ip_address_dashboard.py b/msp/msp/doctype/ip_address/ip_address_dashboard.py new file mode 100644 index 0000000..e2d4eb9 --- /dev/null +++ b/msp/msp/doctype/ip_address/ip_address_dashboard.py @@ -0,0 +1,14 @@ +from __future__ import unicode_literals +from frappe import _ + +def get_data(): + return { + 'heatmap': False, + 'fieldname': 'ip_address', + 'transactions': [ + { + 'label': _('Processes'), + 'items': ['ToDo'] + } + ] + } diff --git a/msp/msp/doctype/ip_network/ip_network_dashboard.py b/msp/msp/doctype/ip_network/ip_network_dashboard.py index 9ccf345..71feceb 100644 --- a/msp/msp/doctype/ip_network/ip_network_dashboard.py +++ b/msp/msp/doctype/ip_network/ip_network_dashboard.py @@ -9,6 +9,10 @@ def get_data(): { 'label': _('Objects'), 'items': ['IP Address' ] + }, + { + 'label': _('Processes'), + 'items': ['ToDo' ] } ] } diff --git a/msp/msp/doctype/it_landscape/it_landscape_dashboard.py b/msp/msp/doctype/it_landscape/it_landscape_dashboard.py index 3b57d2f..7f66ea2 100644 --- a/msp/msp/doctype/it_landscape/it_landscape_dashboard.py +++ b/msp/msp/doctype/it_landscape/it_landscape_dashboard.py @@ -13,7 +13,7 @@ def get_data(): }, { 'label': _('Processes'), - 'items': ['IT Contract'] + 'items': ['IT Contract', 'ToDo'] } ] } diff --git a/msp/msp/doctype/it_object/it_object_dashboard.py b/msp/msp/doctype/it_object/it_object_dashboard.py new file mode 100644 index 0000000..1721e13 --- /dev/null +++ b/msp/msp/doctype/it_object/it_object_dashboard.py @@ -0,0 +1,14 @@ +from __future__ import unicode_literals +from frappe import _ + +def get_data(): + return { + 'heatmap': False, + 'fieldname': 'it_object', + 'transactions': [ + { + 'label': _('Processes'), + 'items': ['ToDo'] + } + ] + } diff --git a/msp/msp/doctype/it_user_account/it_user_account_dashboard.py b/msp/msp/doctype/it_user_account/it_user_account_dashboard.py new file mode 100644 index 0000000..421ec63 --- /dev/null +++ b/msp/msp/doctype/it_user_account/it_user_account_dashboard.py @@ -0,0 +1,14 @@ +from __future__ import unicode_literals +from frappe import _ + +def get_data(): + return { + 'heatmap': False, + 'fieldname': 'it_user_account', + 'transactions': [ + { + 'label': _('Processes'), + 'items': ['ToDo'] + } + ] + }