remove unnecessary doctype 'Timezone'
This commit is contained in:
parent
a1d39cab21
commit
22189ec9e8
@ -1,10 +0,0 @@
|
||||
# -*- 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 TestTimezone(unittest.TestCase):
|
||||
pass
|
@ -1,8 +0,0 @@
|
||||
// Copyright (c) 2019, Frappe Technologies Pvt. Ltd. and contributors
|
||||
// For license information, please see license.txt
|
||||
|
||||
frappe.ui.form.on('Timezone', {
|
||||
// refresh: function(frm) {
|
||||
|
||||
// }
|
||||
});
|
@ -1,61 +0,0 @@
|
||||
{
|
||||
"autoname": "field:timezone_name",
|
||||
"creation": "2019-08-27 11:39:30.328670",
|
||||
"doctype": "DocType",
|
||||
"editable_grid": 1,
|
||||
"engine": "InnoDB",
|
||||
"field_order": [
|
||||
"offset",
|
||||
"timezone_name"
|
||||
],
|
||||
"fields": [
|
||||
{
|
||||
"fieldname": "offset",
|
||||
"fieldtype": "Int",
|
||||
"in_list_view": 1,
|
||||
"label": "Offset In Minutes",
|
||||
"reqd": 1
|
||||
},
|
||||
{
|
||||
"fieldname": "timezone_name",
|
||||
"fieldtype": "Data",
|
||||
"in_list_view": 1,
|
||||
"label": "Name",
|
||||
"reqd": 1,
|
||||
"unique": 1
|
||||
}
|
||||
],
|
||||
"modified": "2019-09-03 11:59:27.729561",
|
||||
"modified_by": "Administrator",
|
||||
"module": "CRM",
|
||||
"name": "Timezone",
|
||||
"name_case": "Title 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
|
||||
},
|
||||
{
|
||||
"email": 1,
|
||||
"export": 1,
|
||||
"print": 1,
|
||||
"read": 1,
|
||||
"report": 1,
|
||||
"role": "Guest",
|
||||
"share": 1
|
||||
}
|
||||
],
|
||||
"quick_entry": 1,
|
||||
"sort_field": "modified",
|
||||
"sort_order": "DESC",
|
||||
"track_changes": 1
|
||||
}
|
@ -1,15 +0,0 @@
|
||||
# -*- 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 Timezone(Document):
|
||||
def validate(self):
|
||||
if self.offset > 720 or self.offset < -720:
|
||||
frappe.throw('Timezone offsets must be between -720 and +720 minutes')
|
||||
if frappe.db.exists({'doctype':'Timezone','offset':self.offset}):
|
||||
frappe.throw('Timezone offsets need to be unique')
|
@ -29,7 +29,6 @@ def get_holiday_list(holiday_list_name):
|
||||
|
||||
@frappe.whitelist(allow_guest=True)
|
||||
def get_timezones():
|
||||
timezones = frappe.get_list('Timezone', fields='*')
|
||||
return pytz.all_timezones
|
||||
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user