From d583e412c9fab0c12993852073126b07c39d8ac4 Mon Sep 17 00:00:00 2001 From: 0Pranav Date: Tue, 22 Oct 2019 12:33:09 +0530 Subject: [PATCH] Add generic 'Appointment' doctype --- .../doctype/appointment/__init__.py | 0 .../doctype/appointment/appointment.js | 8 ++ .../doctype/appointment/appointment.json | 103 ++++++++++++++++++ .../doctype/appointment/appointment.py | 10 ++ .../doctype/appointment/test_appointment.py | 10 ++ 5 files changed, 131 insertions(+) create mode 100644 erpnext/communication/doctype/appointment/__init__.py create mode 100644 erpnext/communication/doctype/appointment/appointment.js create mode 100644 erpnext/communication/doctype/appointment/appointment.json create mode 100644 erpnext/communication/doctype/appointment/appointment.py create mode 100644 erpnext/communication/doctype/appointment/test_appointment.py diff --git a/erpnext/communication/doctype/appointment/__init__.py b/erpnext/communication/doctype/appointment/__init__.py new file mode 100644 index 0000000000..e69de29bb2 diff --git a/erpnext/communication/doctype/appointment/appointment.js b/erpnext/communication/doctype/appointment/appointment.js new file mode 100644 index 0000000000..4e41047fa1 --- /dev/null +++ b/erpnext/communication/doctype/appointment/appointment.js @@ -0,0 +1,8 @@ +// Copyright (c) 2019, Frappe Technologies Pvt. Ltd. and contributors +// For license information, please see license.txt + +frappe.ui.form.on('Appointment', { + // refresh: function(frm) { + + // } +}); diff --git a/erpnext/communication/doctype/appointment/appointment.json b/erpnext/communication/doctype/appointment/appointment.json new file mode 100644 index 0000000000..7d808486ab --- /dev/null +++ b/erpnext/communication/doctype/appointment/appointment.json @@ -0,0 +1,103 @@ +{ + "autoname": "APMT.#####", + "creation": "2019-10-22 12:06:17.491113", + "doctype": "DocType", + "editable_grid": 1, + "engine": "InnoDB", + "field_order": [ + "start_time", + "appointment_duration", + "timezone", + "atendees_section", + "requester_type", + "requester", + "col_br_1", + "invitee_type", + "invitee" + ], + "fields": [ + { + "fieldname": "start_time", + "fieldtype": "Datetime", + "in_list_view": 1, + "label": "Start Time", + "reqd": 1 + }, + { + "fieldname": "appointment_duration", + "fieldtype": "Data", + "in_list_view": 1, + "label": "Duration in minutes", + "reqd": 1 + }, + { + "fieldname": "requester", + "fieldtype": "Dynamic Link", + "in_list_view": 1, + "label": "Appointment Requester ", + "options": "requester_type", + "reqd": 1 + }, + { + "fieldname": "invitee", + "fieldtype": "Dynamic Link", + "in_list_view": 1, + "label": "Appointment Invitee", + "options": "invitee_type", + "reqd": 1 + }, + { + "fieldname": "timezone", + "fieldtype": "Data", + "label": "Requester's Timezone", + "reqd": 1 + }, + { + "fieldname": "atendees_section", + "fieldtype": "Section Break", + "label": "Atendees" + }, + { + "fieldname": "requester_type", + "fieldtype": "Link", + "label": "Requester Type", + "options": "DocType", + "reqd": 1 + }, + { + "fieldname": "col_br_1", + "fieldtype": "Column Break" + }, + { + "fieldname": "invitee_type", + "fieldtype": "Link", + "label": "Invitee Type", + "options": "DocType", + "reqd": 1 + } + ], + "modified": "2019-10-22 12:18:20.719128", + "modified_by": "Administrator", + "module": "Communication", + "name": "Appointment", + "name_case": "UPPER CASE", + "owner": "Administrator", + "permissions": [ + { + "create": 1, + "delete": 1, + "email": 1, + "export": 1, + "print": 1, + "read": 1, + "report": 1, + "role": "System Manager", + "share": 1, + "write": 1 + } + ], + "quick_entry": 1, + "sort_field": "modified", + "sort_order": "DESC", + "track_changes": 1 +} \ No newline at end of file diff --git a/erpnext/communication/doctype/appointment/appointment.py b/erpnext/communication/doctype/appointment/appointment.py new file mode 100644 index 0000000000..204b066031 --- /dev/null +++ b/erpnext/communication/doctype/appointment/appointment.py @@ -0,0 +1,10 @@ +# -*- coding: utf-8 -*- +# Copyright (c) 2019, Frappe Technologies Pvt. Ltd. and contributors +# For license information, please see license.txt + +from __future__ import unicode_literals +# import frappe +from frappe.model.document import Document + +class Appointment(Document): + pass diff --git a/erpnext/communication/doctype/appointment/test_appointment.py b/erpnext/communication/doctype/appointment/test_appointment.py new file mode 100644 index 0000000000..702ac7176f --- /dev/null +++ b/erpnext/communication/doctype/appointment/test_appointment.py @@ -0,0 +1,10 @@ +# -*- coding: utf-8 -*- +# Copyright (c) 2019, Frappe Technologies Pvt. Ltd. and Contributors +# See license.txt +from __future__ import unicode_literals + +# import frappe +import unittest + +class TestAppointment(unittest.TestCase): + pass