[patch] mins_to_first_response in opporutnity and issue
This commit is contained in:
parent
1df75c930f
commit
a55fb6426c
@ -3,6 +3,7 @@
|
|||||||
"allow_import": 1,
|
"allow_import": 1,
|
||||||
"allow_rename": 0,
|
"allow_rename": 0,
|
||||||
"autoname": "naming_series:",
|
"autoname": "naming_series:",
|
||||||
|
"beta": 0,
|
||||||
"creation": "2013-03-07 18:50:30",
|
"creation": "2013-03-07 18:50:30",
|
||||||
"custom": 0,
|
"custom": 0,
|
||||||
"description": "Potential Sales Deal",
|
"description": "Potential Sales Deal",
|
||||||
@ -301,6 +302,31 @@
|
|||||||
"set_only_once": 0,
|
"set_only_once": 0,
|
||||||
"unique": 0
|
"unique": 0
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"allow_on_submit": 0,
|
||||||
|
"bold": 1,
|
||||||
|
"collapsible": 0,
|
||||||
|
"fieldname": "mins_to_first_response",
|
||||||
|
"fieldtype": "Float",
|
||||||
|
"hidden": 0,
|
||||||
|
"ignore_user_permissions": 0,
|
||||||
|
"ignore_xss_filter": 0,
|
||||||
|
"in_filter": 0,
|
||||||
|
"in_list_view": 0,
|
||||||
|
"label": "Mins to first response",
|
||||||
|
"length": 0,
|
||||||
|
"no_copy": 0,
|
||||||
|
"permlevel": 0,
|
||||||
|
"precision": "",
|
||||||
|
"print_hide": 0,
|
||||||
|
"print_hide_if_no_value": 0,
|
||||||
|
"read_only": 1,
|
||||||
|
"report_hide": 0,
|
||||||
|
"reqd": 0,
|
||||||
|
"search_index": 0,
|
||||||
|
"set_only_once": 0,
|
||||||
|
"unique": 0
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"allow_on_submit": 0,
|
"allow_on_submit": 0,
|
||||||
"bold": 0,
|
"bold": 0,
|
||||||
@ -968,13 +994,14 @@
|
|||||||
"hide_toolbar": 0,
|
"hide_toolbar": 0,
|
||||||
"icon": "icon-info-sign",
|
"icon": "icon-info-sign",
|
||||||
"idx": 195,
|
"idx": 195,
|
||||||
|
"image_view": 0,
|
||||||
"in_create": 0,
|
"in_create": 0,
|
||||||
"in_dialog": 0,
|
"in_dialog": 0,
|
||||||
"is_submittable": 0,
|
"is_submittable": 0,
|
||||||
"issingle": 0,
|
"issingle": 0,
|
||||||
"istable": 0,
|
"istable": 0,
|
||||||
"max_attachments": 0,
|
"max_attachments": 0,
|
||||||
"modified": "2016-04-06 03:15:24.676978",
|
"modified": "2016-06-14 15:50:55.080217",
|
||||||
"modified_by": "Administrator",
|
"modified_by": "Administrator",
|
||||||
"module": "CRM",
|
"module": "CRM",
|
||||||
"name": "Opportunity",
|
"name": "Opportunity",
|
||||||
@ -1021,6 +1048,7 @@
|
|||||||
"write": 1
|
"write": 1
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
|
"quick_entry": 0,
|
||||||
"read_only": 0,
|
"read_only": 0,
|
||||||
"read_only_onload": 0,
|
"read_only_onload": 0,
|
||||||
"search_fields": "status,transaction_date,customer,lead,enquiry_type,territory,company",
|
"search_fields": "status,transaction_date,customer,lead,enquiry_type,territory,company",
|
||||||
|
@ -270,3 +270,4 @@ execute:frappe.delete_doc_if_exists("Page", "financial-analytics")
|
|||||||
erpnext.patches.v7_0.update_project_in_gl_entry
|
erpnext.patches.v7_0.update_project_in_gl_entry
|
||||||
execute:frappe.db.sql('update tabQuotation set status="Cancelled" where docstatus=2')
|
execute:frappe.db.sql('update tabQuotation set status="Cancelled" where docstatus=2')
|
||||||
execute:frappe.rename_doc("DocType", "Payments", "Sales Invoice Payment", force=True)
|
execute:frappe.rename_doc("DocType", "Payments", "Sales Invoice Payment", force=True)
|
||||||
|
erpnext.patches.v7_0.update_mins_to_first_response
|
||||||
|
21
erpnext/patches/v7_0/update_mins_to_first_response.py
Normal file
21
erpnext/patches/v7_0/update_mins_to_first_response.py
Normal file
@ -0,0 +1,21 @@
|
|||||||
|
import frappe
|
||||||
|
|
||||||
|
from frappe.core.doctype.communication.email import update_mins_to_first_communication
|
||||||
|
|
||||||
|
def execute():
|
||||||
|
frappe.reload_doctype('Issue')
|
||||||
|
frappe.reload_doctype('Opportunity')
|
||||||
|
|
||||||
|
for doctype in ('Issue', 'Opportunity'):
|
||||||
|
for parent in frappe.get_all(doctype, order_by='creation desc', limit=1000):
|
||||||
|
for communication in frappe.get_all('Communication',
|
||||||
|
filters={'reference_doctype': doctype, 'reference_name': parent.name},
|
||||||
|
order_by = 'creation desc', limit=2):
|
||||||
|
|
||||||
|
parent_doc = frappe.get_doc(doctype, parent.name)
|
||||||
|
communication_doc = frappe.get_doc('Communication', communication.name)
|
||||||
|
|
||||||
|
update_mins_to_first_communication(parent_doc, communication_doc)
|
||||||
|
|
||||||
|
if parent_doc.mins_to_first_response:
|
||||||
|
continue
|
@ -141,6 +141,7 @@
|
|||||||
.pos-payment-row {
|
.pos-payment-row {
|
||||||
border-bottom: 1px solid #d1d8dd;
|
border-bottom: 1px solid #d1d8dd;
|
||||||
margin: 2px 0px 5px 0px;
|
margin: 2px 0px 5px 0px;
|
||||||
|
height: 60px;
|
||||||
}
|
}
|
||||||
.pos-payment-row:hover,
|
.pos-payment-row:hover,
|
||||||
.pos-keyboard-key:hover {
|
.pos-keyboard-key:hover {
|
||||||
@ -158,9 +159,6 @@
|
|||||||
background-color: #FDFDFD;
|
background-color: #FDFDFD;
|
||||||
border-color: #e8e8e8;
|
border-color: #e8e8e8;
|
||||||
}
|
}
|
||||||
.amount {
|
|
||||||
margin-top: 5px;
|
|
||||||
}
|
|
||||||
.amount-label {
|
.amount-label {
|
||||||
font-size: 16px;
|
font-size: 16px;
|
||||||
}
|
}
|
||||||
|
@ -62,7 +62,7 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"allow_on_submit": 0,
|
"allow_on_submit": 0,
|
||||||
"bold": 0,
|
"bold": 1,
|
||||||
"collapsible": 0,
|
"collapsible": 0,
|
||||||
"fieldname": "subject",
|
"fieldname": "subject",
|
||||||
"fieldtype": "Data",
|
"fieldtype": "Data",
|
||||||
@ -84,6 +84,31 @@
|
|||||||
"set_only_once": 0,
|
"set_only_once": 0,
|
||||||
"unique": 0
|
"unique": 0
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"allow_on_submit": 0,
|
||||||
|
"bold": 0,
|
||||||
|
"collapsible": 0,
|
||||||
|
"fieldname": "mins_to_first_response",
|
||||||
|
"fieldtype": "Float",
|
||||||
|
"hidden": 0,
|
||||||
|
"ignore_user_permissions": 0,
|
||||||
|
"ignore_xss_filter": 0,
|
||||||
|
"in_filter": 0,
|
||||||
|
"in_list_view": 0,
|
||||||
|
"label": "Mins to First Response",
|
||||||
|
"length": 0,
|
||||||
|
"no_copy": 0,
|
||||||
|
"permlevel": 0,
|
||||||
|
"precision": "",
|
||||||
|
"print_hide": 0,
|
||||||
|
"print_hide_if_no_value": 0,
|
||||||
|
"read_only": 0,
|
||||||
|
"report_hide": 0,
|
||||||
|
"reqd": 0,
|
||||||
|
"search_index": 0,
|
||||||
|
"set_only_once": 0,
|
||||||
|
"unique": 0
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"allow_on_submit": 0,
|
"allow_on_submit": 0,
|
||||||
"bold": 0,
|
"bold": 0,
|
||||||
@ -137,7 +162,7 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"allow_on_submit": 0,
|
"allow_on_submit": 0,
|
||||||
"bold": 0,
|
"bold": 1,
|
||||||
"collapsible": 0,
|
"collapsible": 0,
|
||||||
"depends_on": "eval:doc.__islocal",
|
"depends_on": "eval:doc.__islocal",
|
||||||
"fieldname": "raised_by",
|
"fieldname": "raised_by",
|
||||||
@ -217,7 +242,7 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"allow_on_submit": 0,
|
"allow_on_submit": 0,
|
||||||
"bold": 0,
|
"bold": 1,
|
||||||
"collapsible": 0,
|
"collapsible": 0,
|
||||||
"depends_on": "",
|
"depends_on": "",
|
||||||
"fieldname": "description",
|
"fieldname": "description",
|
||||||
@ -677,13 +702,14 @@
|
|||||||
"hide_toolbar": 0,
|
"hide_toolbar": 0,
|
||||||
"icon": "icon-ticket",
|
"icon": "icon-ticket",
|
||||||
"idx": 7,
|
"idx": 7,
|
||||||
|
"image_view": 0,
|
||||||
"in_create": 0,
|
"in_create": 0,
|
||||||
"in_dialog": 0,
|
"in_dialog": 0,
|
||||||
"is_submittable": 0,
|
"is_submittable": 0,
|
||||||
"issingle": 0,
|
"issingle": 0,
|
||||||
"istable": 0,
|
"istable": 0,
|
||||||
"max_attachments": 0,
|
"max_attachments": 0,
|
||||||
"modified": "2016-06-04 16:01:15.860333",
|
"modified": "2016-06-14 15:38:50.458873",
|
||||||
"modified_by": "Administrator",
|
"modified_by": "Administrator",
|
||||||
"module": "Support",
|
"module": "Support",
|
||||||
"name": "Issue",
|
"name": "Issue",
|
||||||
|
Loading…
x
Reference in New Issue
Block a user