Update integrations.py and Standard Reply naming
This commit is contained in:
parent
eafecf9241
commit
aa78c34664
5 changed files with 19 additions and 38 deletions
|
|
@ -85,7 +85,7 @@ def get_data():
|
|||
]
|
||||
},
|
||||
{
|
||||
"label": _("Other"),
|
||||
"label": _("Maps"),
|
||||
"items": [
|
||||
{
|
||||
"type": "doctype",
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@
|
|||
"allow_guest_to_view": 0,
|
||||
"allow_import": 1,
|
||||
"allow_rename": 1,
|
||||
"autoname": "field:name",
|
||||
"autoname": "Prompt",
|
||||
"beta": 0,
|
||||
"creation": "2014-06-19 05:20:26.331041",
|
||||
"custom": 0,
|
||||
|
|
@ -13,36 +13,6 @@
|
|||
"editable_grid": 0,
|
||||
"engine": "InnoDB",
|
||||
"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_on_submit": 0,
|
||||
|
|
@ -204,7 +174,7 @@
|
|||
"issingle": 0,
|
||||
"istable": 0,
|
||||
"max_attachments": 0,
|
||||
"modified": "2017-10-17 10:41:42.729188",
|
||||
"modified": "2017-11-10 08:25:07.708599",
|
||||
"modified_by": "Administrator",
|
||||
"module": "Email",
|
||||
"name": "Standard Reply",
|
||||
|
|
|
|||
|
|
@ -2,7 +2,4 @@
|
|||
// For license information, please see license.txt
|
||||
|
||||
frappe.ui.form.on('Google Maps', {
|
||||
refresh: function(frm) {
|
||||
|
||||
}
|
||||
});
|
||||
|
|
|
|||
|
|
@ -5,6 +5,22 @@
|
|||
from __future__ import unicode_literals
|
||||
import frappe
|
||||
from frappe.model.document import Document
|
||||
import datetime
|
||||
|
||||
class GoogleMaps(Document):
|
||||
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
|
||||
# See license.txt
|
||||
from __future__ import unicode_literals
|
||||
|
||||
import frappe
|
||||
import unittest
|
||||
|
||||
class TestGoogleMaps(unittest.TestCase):
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue