Переглянути джерело

Update integrations.py and Standard Reply naming

version-14
Rushabh Mehta 7 роки тому
committed by creamdory
джерело
коміт
aa78c34664
5 змінених файлів з 19 додано та 38 видалено
  1. +1
    -1
      frappe/config/integrations.py
  2. +2
    -32
      frappe/email/doctype/standard_reply/standard_reply.json
  3. +0
    -3
      frappe/integrations/doctype/google_maps/google_maps.js
  4. +16
    -0
      frappe/integrations/doctype/google_maps/google_maps.py
  5. +0
    -2
      frappe/integrations/doctype/google_maps/test_google_maps.py

+ 1
- 1
frappe/config/integrations.py Переглянути файл

@@ -85,7 +85,7 @@ def get_data():
]
},
{
"label": _("Other"),
"label": _("Maps"),
"items": [
{
"type": "doctype",


+ 2
- 32
frappe/email/doctype/standard_reply/standard_reply.json Переглянути файл

@@ -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",


+ 0
- 3
frappe/integrations/doctype/google_maps/google_maps.js Переглянути файл

@@ -2,7 +2,4 @@
// For license information, please see license.txt

frappe.ui.form.on('Google Maps', {
refresh: function(frm) {

}
});

+ 16
- 0
frappe/integrations/doctype/google_maps/google_maps.py Переглянути файл

@@ -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)

+ 0
- 2
frappe/integrations/doctype/google_maps/test_google_maps.py Переглянути файл

@@ -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):


Завантаження…
Відмінити
Зберегти