mirror of
https://github.com/frappe/erpnext.git
synced 2026-05-31 18:59:08 +00:00
refactored communication and added to Lead / Contact
This commit is contained in:
@@ -17,9 +17,7 @@
|
||||
// Module CRM
|
||||
|
||||
wn.require("public/app/js/communication.js");
|
||||
|
||||
wn.require('app/utilities/doctype/sms_control/sms_control.js');
|
||||
wn.require('app/support/doctype/communication/communication.js');
|
||||
|
||||
cur_frm.cscript.onload = function(doc, cdt, cdn) {
|
||||
if(user =='Guest'){
|
||||
@@ -70,9 +68,11 @@ cur_frm.cscript.refresh = function(doc, cdt, cdn) {
|
||||
cur_frm.cscript.refresh_custom_buttons(doc);
|
||||
erpnext.hide_naming_series();
|
||||
|
||||
new erpnext.CommunicationView({
|
||||
cur_frm.communication_view = new erpnext.CommunicationView({
|
||||
list: wn.model.get("Communication", {"lead": doc.name}),
|
||||
parent: cur_frm.fields_dict.communication_html.wrapper
|
||||
parent: cur_frm.fields_dict.communication_html.wrapper,
|
||||
doc: doc,
|
||||
email: doc.email_id
|
||||
})
|
||||
|
||||
}
|
||||
|
||||
@@ -24,8 +24,6 @@ from webnotes import session, msgprint
|
||||
|
||||
sql = webnotes.conn.sql
|
||||
|
||||
# -----------------------------------------------------------------------------------------
|
||||
|
||||
from utilities.transaction_base import TransactionBase
|
||||
|
||||
class DocType(TransactionBase):
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
"docstatus": 0,
|
||||
"creation": "2012-11-02 17:16:46",
|
||||
"modified_by": "Administrator",
|
||||
"modified": "2012-11-26 18:13:22"
|
||||
"modified": "2012-11-27 18:27:47"
|
||||
},
|
||||
{
|
||||
"autoname": "naming_series:",
|
||||
@@ -36,23 +36,6 @@
|
||||
"name": "Lead",
|
||||
"doctype": "DocType"
|
||||
},
|
||||
{
|
||||
"oldfieldtype": "Section Break",
|
||||
"colour": "White:FFF",
|
||||
"doctype": "DocField",
|
||||
"label": "Basic Info",
|
||||
"fieldname": "basic_info",
|
||||
"fieldtype": "Section Break",
|
||||
"permlevel": 0
|
||||
},
|
||||
{
|
||||
"oldfieldtype": "Column Break",
|
||||
"doctype": "DocField",
|
||||
"width": "50%",
|
||||
"fieldname": "column_break0",
|
||||
"fieldtype": "Column Break",
|
||||
"permlevel": 0
|
||||
},
|
||||
{
|
||||
"description": "To manage multiple series please go to Setup > Manage Series",
|
||||
"no_copy": 1,
|
||||
@@ -93,19 +76,27 @@
|
||||
"permlevel": 0
|
||||
},
|
||||
{
|
||||
"description": "Name of organization from where lead has come",
|
||||
"oldfieldtype": "Data",
|
||||
"doctype": "DocField",
|
||||
"fieldname": "cb6",
|
||||
"fieldtype": "Column Break",
|
||||
"permlevel": 0
|
||||
},
|
||||
{
|
||||
"permlevel": 0,
|
||||
"no_copy": 1,
|
||||
"oldfieldtype": "Select",
|
||||
"colour": "White:FFF",
|
||||
"doctype": "DocField",
|
||||
"label": "Company Name",
|
||||
"oldfieldname": "company_name",
|
||||
"label": "Status",
|
||||
"oldfieldname": "status",
|
||||
"default": "Open",
|
||||
"trigger": "Client",
|
||||
"fieldname": "company_name",
|
||||
"fieldtype": "Data",
|
||||
"search_index": 0,
|
||||
"reqd": 0,
|
||||
"in_filter": 1,
|
||||
"permlevel": 0
|
||||
"fieldname": "status",
|
||||
"fieldtype": "Select",
|
||||
"search_index": 1,
|
||||
"reqd": 1,
|
||||
"options": "\nOpen\nAttempted to Contact\nContact in Future\nContacted\nInterested\nNot interested\nLead Lost\nConverted",
|
||||
"in_filter": 1
|
||||
},
|
||||
{
|
||||
"description": "Source of the lead. If via a campaign, select \"Campaign\"",
|
||||
@@ -124,6 +115,45 @@
|
||||
"in_filter": 1,
|
||||
"options": "\nAdvertisement\nBlog\nCampaign\nCall\nCustomer\nExhibition\nSupplier\nWebsite\nEmail"
|
||||
},
|
||||
{
|
||||
"doctype": "DocField",
|
||||
"fieldname": "communication_history",
|
||||
"fieldtype": "Section Break",
|
||||
"permlevel": 0
|
||||
},
|
||||
{
|
||||
"allow_on_submit": 0,
|
||||
"oldfieldtype": "Table",
|
||||
"colour": "White:FFF",
|
||||
"doctype": "DocField",
|
||||
"label": "Communication HTML",
|
||||
"oldfieldname": "follow_up",
|
||||
"fieldname": "communication_html",
|
||||
"fieldtype": "HTML",
|
||||
"permlevel": 0
|
||||
},
|
||||
{
|
||||
"doctype": "DocField",
|
||||
"label": "Lead Details",
|
||||
"fieldname": "sb8",
|
||||
"fieldtype": "Section Break",
|
||||
"permlevel": 0
|
||||
},
|
||||
{
|
||||
"description": "Name of organization from where lead has come",
|
||||
"oldfieldtype": "Data",
|
||||
"colour": "White:FFF",
|
||||
"doctype": "DocField",
|
||||
"label": "Company Name",
|
||||
"oldfieldname": "company_name",
|
||||
"trigger": "Client",
|
||||
"fieldname": "company_name",
|
||||
"fieldtype": "Data",
|
||||
"search_index": 0,
|
||||
"reqd": 0,
|
||||
"in_filter": 1,
|
||||
"permlevel": 0
|
||||
},
|
||||
{
|
||||
"description": "Source of th",
|
||||
"oldfieldtype": "Link",
|
||||
@@ -159,23 +189,6 @@
|
||||
"fieldtype": "Column Break",
|
||||
"permlevel": 0
|
||||
},
|
||||
{
|
||||
"permlevel": 0,
|
||||
"no_copy": 1,
|
||||
"oldfieldtype": "Select",
|
||||
"colour": "White:FFF",
|
||||
"doctype": "DocField",
|
||||
"label": "Status",
|
||||
"oldfieldname": "status",
|
||||
"default": "Open",
|
||||
"trigger": "Client",
|
||||
"fieldname": "status",
|
||||
"fieldtype": "Select",
|
||||
"search_index": 1,
|
||||
"reqd": 1,
|
||||
"options": "\nOpen\nAttempted to Contact\nContact in Future\nContacted\nInterested\nNot interested\nLead Lost\nConverted",
|
||||
"in_filter": 1
|
||||
},
|
||||
{
|
||||
"oldfieldtype": "Select",
|
||||
"colour": "White:FFF",
|
||||
@@ -198,23 +211,6 @@
|
||||
"fieldtype": "Small Text",
|
||||
"permlevel": 0
|
||||
},
|
||||
{
|
||||
"doctype": "DocField",
|
||||
"fieldname": "communication_history",
|
||||
"fieldtype": "Section Break",
|
||||
"permlevel": 0
|
||||
},
|
||||
{
|
||||
"oldfieldtype": "Table",
|
||||
"colour": "White:FFF",
|
||||
"allow_on_submit": 0,
|
||||
"doctype": "DocField",
|
||||
"label": "Communication HTML",
|
||||
"oldfieldname": "follow_up",
|
||||
"fieldname": "communication_html",
|
||||
"fieldtype": "HTML",
|
||||
"permlevel": 0
|
||||
},
|
||||
{
|
||||
"oldfieldtype": "Column Break",
|
||||
"doctype": "DocField",
|
||||
|
||||
Reference in New Issue
Block a user