@@ -85,7 +85,7 @@ def get_data(): | |||||
] | ] | ||||
}, | }, | ||||
{ | { | ||||
"label": _("Other"), | |||||
"label": _("Maps"), | |||||
"items": [ | "items": [ | ||||
{ | { | ||||
"type": "doctype", | "type": "doctype", | ||||
@@ -3,7 +3,7 @@ | |||||
"allow_guest_to_view": 0, | "allow_guest_to_view": 0, | ||||
"allow_import": 1, | "allow_import": 1, | ||||
"allow_rename": 1, | "allow_rename": 1, | ||||
"autoname": "field:name", | |||||
"autoname": "Prompt", | |||||
"beta": 0, | "beta": 0, | ||||
"creation": "2014-06-19 05:20:26.331041", | "creation": "2014-06-19 05:20:26.331041", | ||||
"custom": 0, | "custom": 0, | ||||
@@ -13,36 +13,6 @@ | |||||
"editable_grid": 0, | "editable_grid": 0, | ||||
"engine": "InnoDB", | "engine": "InnoDB", | ||||
"fields": [ | "fields": [ | ||||
{ | |||||
"allow_bulk_edit": 0, | |||||
"allow_on_submit": 0, | |||||
"bold": 0, | |||||
"collapsible": 0, | |||||
"columns": 0, | |||||
"fieldname": "name", | |||||
"fieldtype": "Data", | |||||
"hidden": 0, | |||||
"ignore_user_permissions": 0, | |||||
"ignore_xss_filter": 0, | |||||
"in_filter": 0, | |||||
"in_global_search": 0, | |||||
"in_list_view": 1, | |||||
"in_standard_filter": 0, | |||||
"label": "Name", | |||||
"length": 0, | |||||
"no_copy": 0, | |||||
"permlevel": 0, | |||||
"precision": "", | |||||
"print_hide": 0, | |||||
"print_hide_if_no_value": 0, | |||||
"read_only": 0, | |||||
"remember_last_selected_value": 0, | |||||
"report_hide": 0, | |||||
"reqd": 1, | |||||
"search_index": 0, | |||||
"set_only_once": 0, | |||||
"unique": 0 | |||||
}, | |||||
{ | { | ||||
"allow_bulk_edit": 0, | "allow_bulk_edit": 0, | ||||
"allow_on_submit": 0, | "allow_on_submit": 0, | ||||
@@ -204,7 +174,7 @@ | |||||
"issingle": 0, | "issingle": 0, | ||||
"istable": 0, | "istable": 0, | ||||
"max_attachments": 0, | "max_attachments": 0, | ||||
"modified": "2017-10-17 10:41:42.729188", | |||||
"modified": "2017-11-10 08:25:07.708599", | |||||
"modified_by": "Administrator", | "modified_by": "Administrator", | ||||
"module": "Email", | "module": "Email", | ||||
"name": "Standard Reply", | "name": "Standard Reply", | ||||
@@ -2,7 +2,4 @@ | |||||
// For license information, please see license.txt | // For license information, please see license.txt | ||||
frappe.ui.form.on('Google Maps', { | frappe.ui.form.on('Google Maps', { | ||||
refresh: function(frm) { | |||||
} | |||||
}); | }); |
@@ -5,6 +5,22 @@ | |||||
from __future__ import unicode_literals | from __future__ import unicode_literals | ||||
import frappe | import frappe | ||||
from frappe.model.document import Document | from frappe.model.document import Document | ||||
import datetime | |||||
class GoogleMaps(Document): | class GoogleMaps(Document): | ||||
pass | pass | ||||
def round_timedelta(td, period): | |||||
"""Round timedelta""" | |||||
period_seconds = period.total_seconds() | |||||
half_period_seconds = period_seconds / 2 | |||||
remainder = td.total_seconds() % period_seconds | |||||
if remainder >= half_period_seconds: | |||||
return datetime.timedelta(seconds=td.total_seconds() + (period_seconds - remainder)) | |||||
else: | |||||
return datetime.timedelta(seconds=td.total_seconds() - remainder) | |||||
def customer_address_format(address): | |||||
"""Customer Address format """ | |||||
address = frappe.get_doc('Address', address) | |||||
return '{}, {}, {}, {}'.format(address.address_line1, address.city, address.pincode, address.country) |
@@ -2,8 +2,6 @@ | |||||
# Copyright (c) 2017, Frappe Technologies and Contributors | # Copyright (c) 2017, Frappe Technologies and Contributors | ||||
# See license.txt | # See license.txt | ||||
from __future__ import unicode_literals | from __future__ import unicode_literals | ||||
import frappe | |||||
import unittest | import unittest | ||||
class TestGoogleMaps(unittest.TestCase): | class TestGoogleMaps(unittest.TestCase): | ||||