diff --git a/erpnext/support/doctype/service_level/__init__.py b/erpnext/support/doctype/service_level/__init__.py
deleted file mode 100644
index e69de29..0000000
--- a/erpnext/support/doctype/service_level/__init__.py
+++ /dev/null
diff --git a/erpnext/support/doctype/service_level/service_level.js b/erpnext/support/doctype/service_level/service_level.js
deleted file mode 100644
index abe254b..0000000
--- a/erpnext/support/doctype/service_level/service_level.js
+++ /dev/null
@@ -1,6 +0,0 @@
-// Copyright (c) 2018, Frappe Technologies Pvt. Ltd. and contributors
-// For license information, please see license.txt
-
-frappe.ui.form.on('Service Level', {
-
-});
diff --git a/erpnext/support/doctype/service_level/service_level.json b/erpnext/support/doctype/service_level/service_level.json
deleted file mode 100644
index dced3aa..0000000
--- a/erpnext/support/doctype/service_level/service_level.json
+++ /dev/null
@@ -1,111 +0,0 @@
-{
- "autoname": "field:service_level",
- "creation": "2018-11-19 12:44:30.407502",
- "doctype": "DocType",
- "editable_grid": 1,
- "engine": "InnoDB",
- "field_order": [
-  "service_level",
-  "employee_group",
-  "column_break_2",
-  "holiday_list",
-  "default_priority",
-  "response_and_resoution_time",
-  "priorities",
-  "section_break_01",
-  "support_and_resolution"
- ],
- "fields": [
-  {
-   "fieldname": "service_level",
-   "fieldtype": "Data",
-   "in_list_view": 1,
-   "label": "Level",
-   "reqd": 1,
-   "unique": 1
-  },
-  {
-   "fieldname": "column_break_2",
-   "fieldtype": "Column Break"
-  },
-  {
-   "fieldname": "holiday_list",
-   "fieldtype": "Link",
-   "in_list_view": 1,
-   "label": "Holiday List (ignored during SLA calculation)",
-   "options": "Holiday List",
-   "reqd": 1
-  },
-  {
-   "fieldname": "employee_group",
-   "fieldtype": "Link",
-   "in_list_view": 1,
-   "label": "Employee Group",
-   "options": "Employee Group"
-  },
-  {
-   "fieldname": "response_and_resoution_time",
-   "fieldtype": "Section Break",
-   "label": "Response and Resoution Time"
-  },
-  {
-   "fieldname": "section_break_01",
-   "fieldtype": "Section Break",
-   "label": "Support Hours"
-  },
-  {
-   "fieldname": "support_and_resolution",
-   "fieldtype": "Table",
-   "label": "Support and Resolution",
-   "options": "Service Day",
-   "reqd": 1
-  },
-  {
-   "fieldname": "priorities",
-   "fieldtype": "Table",
-   "label": "Priorities",
-   "options": "Service Level Priority",
-   "reqd": 1
-  },
-  {
-   "fieldname": "default_priority",
-   "fieldtype": "Link",
-   "label": "Default Priority",
-   "options": "Issue Priority",
-   "read_only": 1
-  }
- ],
- "modified": "2019-06-06 12:58:03.464056",
- "modified_by": "Administrator",
- "module": "Support",
- "name": "Service Level",
- "owner": "Administrator",
- "permissions": [
-  {
-   "create": 1,
-   "delete": 1,
-   "email": 1,
-   "export": 1,
-   "print": 1,
-   "read": 1,
-   "report": 1,
-   "role": "System Manager",
-   "share": 1,
-   "write": 1
-  },
-  {
-   "create": 1,
-   "delete": 1,
-   "email": 1,
-   "export": 1,
-   "print": 1,
-   "read": 1,
-   "report": 1,
-   "role": "All",
-   "share": 1,
-   "write": 1
-  }
- ],
- "sort_field": "modified",
- "sort_order": "DESC"
-}
\ No newline at end of file
diff --git a/erpnext/support/doctype/service_level/service_level.py b/erpnext/support/doctype/service_level/service_level.py
deleted file mode 100644
index 89fa25c..0000000
--- a/erpnext/support/doctype/service_level/service_level.py
+++ /dev/null
@@ -1,95 +0,0 @@
-# -*- coding: utf-8 -*-
-# Copyright (c) 2018, Frappe Technologies Pvt. Ltd. and contributors
-# For license information, please see license.txt
-
-from __future__ import unicode_literals
-import frappe
-from frappe import _
-from frappe.model.document import Document
-from datetime import datetime
-from frappe.utils import get_weekdays
-
-class ServiceLevel(Document):
-
-	def validate(self):
-		self.check_priorities()
-		self.check_support_and_resolution()
-
-	def check_priorities(self):
-		default_priority = []
-		priorities = []
-
-		for priority in self.priorities:
-			# Check if response and resolution time is set for every priority
-			if not (priority.response_time or priority.resolution_time):
-				frappe.throw(_("Set Response Time and Resolution for Priority {0} at index {1}.").format(priority.priority, priority.idx))
-
-			priorities.append(priority.priority)
-
-			if priority.default_priority:
-				default_priority.append(priority.default_priority)
-
-			if priority.response_time_period == "Hour":
-				response = priority.response_time * 0.0416667
-			elif priority.response_time_period == "Day":
-				response = priority.response_time
-			elif priority.response_time_period == "Week":
-				response = priority.response_time * 7
-
-			if priority.resolution_time_period == "Hour":
-				resolution = priority.resolution_time * 0.0416667
-			elif priority.resolution_time_period == "Day":
-				resolution = priority.resolution_time
-			elif priority.resolution_time_period == "Week":
-				resolution = priority.resolution_time * 7
-
-			if response > resolution:
-				frappe.throw(_("Response Time for {0} at index {1} can't be greater than Resolution Time.").format(priority.priority, priority.idx))
-
-		# Check if repeated priority
-		if not len(set(priorities)) == len(priorities):
-			repeated_priority = get_repeated(priorities)
-			frappe.throw(_("Priority {0} has been repeated.").format(repeated_priority))
-
-		# Check if repeated default priority
-		if not len(set(default_priority)) == len(default_priority):
-			frappe.throw(_("Select only one Priority as Default."))
-
-		# set default priority from priorities
-		try:
-			self.default_priority = next(d.priority for d in self.priorities if d.default_priority)
-		except Exception:
-			frappe.throw(_("Select a Default Priority."))
-
-	def check_support_and_resolution(self):
-		week = get_weekdays()
-		support_days = []
-
-		for support_and_resolution in self.support_and_resolution:
-			# Check if start and end time is set for every support day
-			if not (support_and_resolution.start_time or support_and_resolution.end_time):
-				frappe.throw(_("Set Start Time and End Time for  \
-					Support Day {0} at index {1}.".format(support_and_resolution.workday, support_and_resolution.idx)))
-
-			support_days.append(support_and_resolution.workday)
-			support_and_resolution.idx = week.index(support_and_resolution.workday) + 1
-
-			if support_and_resolution.start_time >= support_and_resolution.end_time:
-				frappe.throw(_("Start Time can't be greater than or equal to End Time \
-					for {0}.".format(support_and_resolution.workday)))
-
-		# Check for repeated workday
-		if not len(set(support_days)) == len(support_days):
-			repeated_days = get_repeated(support_days)
-			frappe.throw(_("Workday {0} has been repeated.").format(repeated_days))
-
-def get_repeated(values):
-	unique_list = []
-	diff = []
-	for value in values:
-		if value not in unique_list:
-			unique_list.append(str(value))
-		else:
-			if value not in diff:
-				diff.append(str(value))
-	return " ".join(diff)
diff --git a/erpnext/support/doctype/service_level/service_level_dashboard.py b/erpnext/support/doctype/service_level/service_level_dashboard.py
deleted file mode 100644
index 393095e..0000000
--- a/erpnext/support/doctype/service_level/service_level_dashboard.py
+++ /dev/null
@@ -1,12 +0,0 @@
-from frappe import _
-
-def get_data():
-	return {
-		'fieldname': 'service_level',
-		'transactions': [
-			{
-				'label': _('Service Level Agreement'),
-				'items': ['Service Level Agreement']
-			}
-		]
-	}
\ No newline at end of file
diff --git a/erpnext/support/doctype/service_level/test_service_level.py b/erpnext/support/doctype/service_level/test_service_level.py
deleted file mode 100644
index 09577df..0000000
--- a/erpnext/support/doctype/service_level/test_service_level.py
+++ /dev/null
@@ -1,149 +0,0 @@
-# -*- coding: utf-8 -*-
-# Copyright (c) 2018, Frappe Technologies Pvt. Ltd. and Contributors
-# See license.txt
-from __future__ import unicode_literals
-from erpnext.hr.doctype.employee_group.test_employee_group import make_employee_group
-from erpnext.support.doctype.issue_priority.test_issue_priority import make_priorities
-
-import frappe
-import unittest
-
-class TestServiceLevel(unittest.TestCase):
-
-	def test_service_level(self):
-		employee_group = make_employee_group()
-		make_holiday_list()
-		make_priorities()
-
-		# Default Service Level
-		test_make_service_level = create_service_level("__Test Service Level", "__Test Holiday List", employee_group, 4, 6)
-		get_make_service_level = get_service_level("__Test Service Level")
-
-		self.assertEqual(test_make_service_level.name, get_make_service_level.name)
-		self.assertEqual(test_make_service_level.holiday_list, get_make_service_level.holiday_list)
-		self.assertEqual(test_make_service_level.employee_group, get_make_service_level.employee_group)
-
-		# Service Level
-		test_make_service_level = create_service_level("_Test Service Level", "__Test Holiday List", employee_group, 2, 3)
-		get_make_service_level = get_service_level("_Test Service Level")
-
-		self.assertEqual(test_make_service_level.name, get_make_service_level.name)
-		self.assertEqual(test_make_service_level.holiday_list, get_make_service_level.holiday_list)
-		self.assertEqual(test_make_service_level.employee_group, get_make_service_level.employee_group)
-
-
-def create_service_level(service_level, holiday_list, employee_group, response_time, resolution_time):
-	sl = frappe.get_doc({
-		"doctype": "Service Level",
-		"service_level": service_level,
-		"holiday_list": holiday_list,
-		"employee_group": employee_group,
-		"priorities": [
-			{
-				"priority": "Low",
-				"response_time": response_time,
-				"response_time_period": "Hour",
-				"resolution_time": resolution_time,
-				"resolution_time_period": "Hour",
-			},
-			{
-				"priority": "Medium",
-				"response_time": response_time,
-				"default_priority": 1,
-				"response_time_period": "Hour",
-				"resolution_time": resolution_time,
-				"resolution_time_period": "Hour",
-			},
-			{
-				"priority": "High",
-				"response_time": response_time,
-				"response_time_period": "Hour",
-				"resolution_time": resolution_time,
-				"resolution_time_period": "Hour",
-			}
-		],
-		"support_and_resolution": [
-			{
-				"workday": "Monday",
-				"start_time": "10:00:00",
-				"end_time": "18:00:00",
-			},
-			{
-				"workday": "Tuesday",
-				"start_time": "10:00:00",
-				"end_time": "18:00:00",
-			},
-			{
-				"workday": "Wednesday",
-				"start_time": "10:00:00",
-				"end_time": "18:00:00",
-			},
-			{
-				"workday": "Thursday",
-				"start_time": "10:00:00",
-				"end_time": "18:00:00",
-			},
-			{
-				"workday": "Friday",
-				"start_time": "10:00:00",
-				"end_time": "18:00:00",
-			},
-			{
-				"workday": "Saturday",
-				"start_time": "10:00:00",
-				"end_time": "18:00:00",
-			},
-			{
-				"workday": "Sunday",
-				"start_time": "10:00:00",
-				"end_time": "18:00:00",
-			}
-		]
-	})
-
-	sl_exists = frappe.db.exists("Service Level", {"service_level": service_level})
-
-	if not sl_exists:
-		sl.insert()
-		return sl
-	else:
-		return frappe.get_doc("Service Level", {"service_level": service_level})
-
-def get_service_level(service_level):
-	return frappe.get_doc("Service Level", service_level)
-
-def make_holiday_list():
-	holiday_list = frappe.db.exists("Holiday List", "__Test Holiday List")
-	if not holiday_list:
-		now = frappe.utils.now_datetime()
-		holiday_list = frappe.get_doc({
-			"doctype": "Holiday List",
-			"holiday_list_name": "__Test Holiday List",
-			"from_date": "2019-01-01",
-			"to_date": "2019-12-31",
-			"holidays": [
-				{
-					"description": "Test Holiday 1",
-					"holiday_date": "2019-03-05"
-				},
-				{
-					"description": "Test Holiday 2",
-					"holiday_date": "2019-03-07"
-				},
-				{
-					"description": "Test Holiday 3",
-					"holiday_date": "2019-02-11"
-				},
-			]
-		}).insert()
-
-def create_service_level_for_sla():
-	employee_group = make_employee_group()
-	make_holiday_list()
-	make_priorities()
-
-	# Default Service Level
-	create_service_level("__Test Service Level", "__Test Holiday List", employee_group, 4, 6)
-
-	# Service Level
-	create_service_level("_Test Service Level", "__Test Holiday List", employee_group, 2, 3)
diff --git a/erpnext/support/doctype/service_level_agreement/service_level_agreement.json b/erpnext/support/doctype/service_level_agreement/service_level_agreement.json
index 3725e15..2d33c3e 100644
--- a/erpnext/support/doctype/service_level_agreement/service_level_agreement.json
+++ b/erpnext/support/doctype/service_level_agreement/service_level_agreement.json
@@ -40,7 +40,8 @@
    "fieldname": "holiday_list",
    "fieldtype": "Link",
    "label": "Holiday List",
-   "options": "Holiday List"
+   "options": "Holiday List",
+   "reqd": 1
   },
   {
    "fieldname": "column_break_2",
@@ -92,13 +93,15 @@
    "fieldname": "support_and_resolution",
    "fieldtype": "Table",
    "label": "Support and Resolution",
-   "options": "Service Day"
+   "options": "Service Day",
+   "reqd": 1
   },
   {
    "fieldname": "priorities",
    "fieldtype": "Table",
    "label": "Priorities",
-   "options": "Service Level Priority"
+   "options": "Service Level Priority",
+   "reqd": 1
   },
   {
    "default": "1",
@@ -150,7 +153,7 @@
   }
  ],
  "links": [],
- "modified": "2020-04-28 14:10:18.767202",
+ "modified": "2020-05-06 11:46:38.834810",
  "modified_by": "Administrator",
  "module": "Support",
  "name": "Service Level Agreement",
