[cleanup] removed communication js, fields

This commit is contained in:
Rushabh Mehta 2014-09-11 18:54:43 +05:30
parent 7b128dc15b
commit ce00772ac0
11 changed files with 899 additions and 939 deletions

View File

@ -4,10 +4,10 @@
from __future__ import unicode_literals
import frappe
from frappe.utils import cstr, cint
from frappe.email.receive import POP3Mailbox
from frappe.email.receive import POP3Server
from frappe.core.doctype.communication.communication import _make
class JobsMailbox(POP3Mailbox):
class JobsMailbox(POP3Server):
def setup(self, args=None):
self.settings = args or frappe.get_doc("Jobs Email Settings", "Jobs Email Settings")

View File

@ -4,7 +4,7 @@
from __future__ import unicode_literals
import frappe
from frappe.utils import cstr, cint
from frappe.email.receive import POP3Mailbox
from frappe.email.receive import POP3Server
from frappe.core.doctype.communication.communication import _make
def add_sales_communication(subject, content, sender, real_name, mail=None,
@ -37,7 +37,7 @@ def add_sales_communication(subject, content, sender, real_name, mail=None,
doc = frappe.get_doc(parent_doctype, parent_name)
mail.save_attachments_in_doc(doc)
class SalesMailbox(POP3Mailbox):
class SalesMailbox(POP3Server):
def setup(self, args=None):
self.settings = args or frappe.get_doc("Sales Email Settings", "Sales Email Settings")

View File

@ -34,13 +34,6 @@ erpnext.LeadController = frappe.ui.form.Controller.extend({
this.frm.appframe.add_button(__("Send SMS"), this.frm.cscript.send_sms, "icon-mobile-phone");
}
cur_frm.communication_view = new frappe.views.CommunicationList({
list: frappe.get_list("Communication", {"parenttype": "Lead", "parent":this.frm.doc.name}),
parent: this.frm.fields_dict.communication_html.wrapper,
doc: this.frm.doc,
recipients: this.frm.doc.email_id
});
if(!this.frm.doc.__islocal) {
this.make_address_list();
}

View File

@ -58,11 +58,6 @@
"reqd": 0,
"search_index": 1
},
{
"fieldname": "cb6",
"fieldtype": "Column Break",
"permlevel": 0
},
{
"default": "Lead",
"fieldname": "status",
@ -92,6 +87,12 @@
"reqd": 0,
"search_index": 0
},
{
"fieldname": "col_break123",
"fieldtype": "Column Break",
"permlevel": 0,
"width": "50%"
},
{
"depends_on": "eval:doc.source == 'Customer'",
"fieldname": "customer",
@ -115,14 +116,6 @@
"options": "Campaign",
"permlevel": 0
},
{
"fieldname": "communication_history",
"fieldtype": "Section Break",
"label": "Communication",
"options": "icon-comments",
"permlevel": 0,
"print_hide": 1
},
{
"default": "__user",
"fieldname": "lead_owner",
@ -135,12 +128,6 @@
"permlevel": 0,
"search_index": 1
},
{
"fieldname": "col_break123",
"fieldtype": "Column Break",
"permlevel": 0,
"width": "50%"
},
{
"allow_on_submit": 0,
"fieldname": "contact_by",
@ -170,21 +157,6 @@
"reqd": 0,
"width": "100px"
},
{
"fieldname": "sec_break123",
"fieldtype": "Section Break",
"options": "Simple",
"permlevel": 0
},
{
"allow_on_submit": 0,
"fieldname": "communication_html",
"fieldtype": "HTML",
"label": "Communication HTML",
"oldfieldname": "follow_up",
"oldfieldtype": "Table",
"permlevel": 0
},
{
"fieldname": "fold",
"fieldtype": "Fold",
@ -355,20 +327,11 @@
"fieldtype": "Check",
"label": "Blog Subscriber",
"permlevel": 0
},
{
"fieldname": "communications",
"fieldtype": "Table",
"hidden": 1,
"label": "Communications",
"options": "Communication",
"permlevel": 0,
"print_hide": 1
}
],
"icon": "icon-user",
"idx": 1,
"modified": "2014-08-12 05:22:18.801092",
"modified": "2014-09-11 18:52:50.397563",
"modified_by": "Administrator",
"module": "Selling",
"name": "Lead",
@ -376,6 +339,34 @@
"permissions": [
{
"amend": 0,
"cancel": 0,
"create": 0,
"delete": 0,
"match": "",
"permlevel": 1,
"read": 1,
"report": 1,
"role": "All",
"submit": 0,
"write": 0
},
{
"amend": 0,
"cancel": 0,
"create": 1,
"delete": 0,
"email": 1,
"permlevel": 0,
"print": 1,
"read": 1,
"report": 1,
"role": "Sales User",
"submit": 0,
"write": 1
},
{
"amend": 0,
"cancel": 0,
"create": 1,
"delete": 1,
"email": 1,
@ -389,7 +380,7 @@
},
{
"amend": 0,
"apply_user_permissions": 1,
"cancel": 0,
"create": 1,
"delete": 0,
"email": 1,
@ -397,9 +388,35 @@
"print": 1,
"read": 1,
"report": 1,
"role": "Sales User",
"role": "System Manager",
"submit": 0,
"write": 1
},
{
"amend": 0,
"cancel": 0,
"create": 0,
"delete": 0,
"match": "",
"permlevel": 1,
"read": 1,
"report": 1,
"role": "Sales Manager",
"submit": 0,
"write": 0
},
{
"amend": 0,
"cancel": 0,
"create": 0,
"delete": 0,
"match": "",
"permlevel": 1,
"read": 1,
"report": 1,
"role": "Sales User",
"submit": 0,
"write": 0
}
],
"search_fields": "lead_name,lead_owner,status",

View File

@ -134,26 +134,6 @@
"permlevel": 0,
"read_only": 0
},
{
"description": "Keep a track of communication related to this enquiry which will help for future reference.",
"fieldname": "communication_history",
"fieldtype": "Section Break",
"label": "Communication History",
"oldfieldtype": "Section Break",
"options": "icon-comments",
"permlevel": 0,
"read_only": 0
},
{
"allow_on_submit": 1,
"fieldname": "communication_html",
"fieldtype": "HTML",
"label": "Communication HTML",
"oldfieldname": "follow_up",
"oldfieldtype": "Table",
"permlevel": 0,
"read_only": 0
},
{
"fieldname": "fold",
"fieldtype": "Fold",
@ -402,21 +382,12 @@
"print_hide": 1,
"read_only": 1,
"width": "150px"
},
{
"fieldname": "communications",
"fieldtype": "Table",
"hidden": 1,
"label": "Communications",
"options": "Communication",
"permlevel": 0,
"print_hide": 1
}
],
"icon": "icon-info-sign",
"idx": 1,
"is_submittable": 1,
"modified": "2014-08-12 05:21:51.282397",
"modified": "2014-09-11 18:53:14.037512",
"modified_by": "Administrator",
"module": "Selling",
"name": "Opportunity",
@ -424,7 +395,6 @@
"permissions": [
{
"amend": 1,
"apply_user_permissions": 1,
"cancel": 1,
"create": 1,
"delete": 1,

File diff suppressed because it is too large Load Diff

View File

@ -8,7 +8,7 @@ import frappe
from frappe import _
from frappe.utils import cint
from frappe.model.document import Document
from frappe.email.receive import POP3Mailbox
from frappe.email.receive import POP3Server
import _socket, poplib
class SupportEmailSettings(Document):
@ -32,7 +32,7 @@ class SupportEmailSettings(Document):
frappe.msgprint(err_msg)
raise
pop_mb = POP3Mailbox(inc_email)
pop_mb = POP3Server(inc_email)
try:
pop_mb.connect()

View File

@ -5,10 +5,10 @@ from __future__ import unicode_literals
import frappe
from frappe.utils import cstr, cint, decode_dict, today
from frappe.email import sendmail
from frappe.email.receive import POP3Mailbox
from frappe.email.receive import POP3Server
from frappe.core.doctype.communication.communication import _make
class SupportMailbox(POP3Mailbox):
class SupportMailbox(POP3Server):
def setup(self, args=None):
self.email_settings = frappe.get_doc("Support Email Settings", "Support Email Settings")
self.settings = args or frappe._dict({

View File

@ -11,7 +11,6 @@ cur_frm.add_fetch("customer", "customer_name", "customer_name")
$.extend(cur_frm.cscript, {
refresh: function(doc) {
erpnext.toggle_naming_series();
cur_frm.cscript.make_listing(doc);
if(!doc.__islocal) {
if(cur_frm.fields_dict.status.get_status()=="Write") {
if(doc.status!='Closed') cur_frm.add_custom_button('Close',
@ -26,28 +25,6 @@ $.extend(cur_frm.cscript, {
refresh_field('status');
},
make_listing: function(doc) {
var wrapper = cur_frm.fields_dict['thread_html'].wrapper;
var comm_list = frappe.get_list("Communication", {"parent": doc.name, "parenttype":"Support Ticket"})
if(!comm_list.length) {
comm_list.push({
"sender": doc.raised_by,
"creation": doc.creation,
"subject": doc.subject,
"content": doc.description});
}
cur_frm.communication_view = new frappe.views.CommunicationList({
list: comm_list,
parent: wrapper,
doc: doc,
recipients: doc.raised_by
})
},
'Close Ticket': function() {
cur_frm.cscript.set_status("Closed");
},

View File

@ -1,5 +1,6 @@
{
"autoname": "naming_series:",
"allow_attach": 1,
"autoname": "naming_series:",
"creation": "2013-02-01 10:36:25",
"docstatus": 0,
"doctype": "DocType",
@ -67,13 +68,6 @@
"permlevel": 0,
"reqd": 1
},
{
"fieldname": "sb00",
"fieldtype": "Section Break",
"label": "Messages",
"options": "icon-comments",
"permlevel": 0
},
{
"depends_on": "eval:doc.__islocal",
"fieldname": "description",
@ -84,14 +78,6 @@
"permlevel": 0,
"reqd": 0
},
{
"depends_on": "eval:!doc.__islocal",
"fieldname": "thread_html",
"fieldtype": "HTML",
"label": "Thread HTML",
"permlevel": 0,
"read_only": 1
},
{
"fieldname": "fold",
"fieldtype": "Fold",
@ -228,20 +214,11 @@
"hidden": 1,
"label": "Content Type",
"permlevel": 0
},
{
"fieldname": "communications",
"fieldtype": "Table",
"hidden": 1,
"label": "Communications",
"options": "Communication",
"permlevel": 0,
"print_hide": 1
}
],
"icon": "icon-ticket",
"idx": 1,
"modified": "2014-08-12 05:25:45.420934",
"modified": "2014-09-11 18:53:21.140997",
"modified_by": "Administrator",
"module": "Support",
"name": "Support Ticket",
@ -249,6 +226,7 @@
"permissions": [
{
"amend": 0,
"cancel": 0,
"create": 1,
"delete": 0,
"email": 1,
@ -262,7 +240,7 @@
},
{
"amend": 0,
"apply_user_permissions": 1,
"cancel": 0,
"create": 1,
"delete": 0,
"email": 1,
@ -276,7 +254,7 @@
},
{
"amend": 0,
"apply_user_permissions": 1,
"cancel": 0,
"create": 1,
"delete": 1,
"email": 1,
@ -287,6 +265,30 @@
"role": "Support Team",
"submit": 0,
"write": 1
},
{
"amend": 0,
"cancel": 0,
"create": 0,
"delete": 0,
"permlevel": 1,
"read": 1,
"report": 1,
"role": "Support Team",
"submit": 0,
"write": 1
},
{
"amend": 0,
"cancel": 0,
"create": 0,
"delete": 0,
"permlevel": 2,
"read": 1,
"report": 1,
"role": "Support Team",
"submit": 0,
"write": 0
}
],
"search_fields": "status,customer,subject,raised_by",

View File

@ -66,21 +66,6 @@
"permlevel": 0,
"reqd": 0
},
{
"fieldname": "sb00",
"fieldtype": "Section Break",
"label": "Communication History",
"options": "icon-comments",
"permlevel": 0,
"print_hide": 1
},
{
"fieldname": "communication_html",
"fieldtype": "HTML",
"label": "Communication HTML",
"permlevel": 0,
"print_hide": 1
},
{
"fieldname": "contact_details",
"fieldtype": "Section Break",
@ -187,28 +172,20 @@
"fieldtype": "Check",
"label": "Unsubscribed",
"permlevel": 0
},
{
"fieldname": "communications",
"fieldtype": "Table",
"hidden": 1,
"label": "Communications",
"options": "Communication",
"permlevel": 0,
"print_hide": 1
}
],
"icon": "icon-user",
"idx": 1,
"in_create": 0,
"in_dialog": 0,
"modified": "2014-07-30 05:44:25.767076",
"modified": "2014-09-11 18:53:17.311624",
"modified_by": "Administrator",
"module": "Utilities",
"name": "Contact",
"owner": "Administrator",
"permissions": [
{
"cancel": 0,
"create": 1,
"delete": 1,
"email": 1,
@ -222,6 +199,7 @@
},
{
"amend": 0,
"cancel": 0,
"create": 1,
"delete": 1,
"email": 1,
@ -234,6 +212,7 @@
"write": 1
},
{
"cancel": 0,
"create": 1,
"delete": 1,
"email": 1,
@ -246,6 +225,7 @@
"write": 1
},
{
"cancel": 0,
"create": 1,
"delete": 0,
"email": 1,
@ -258,6 +238,7 @@
"write": 1
},
{
"cancel": 0,
"create": 1,
"delete": 0,
"email": 1,
@ -270,6 +251,7 @@
"write": 1
},
{
"cancel": 0,
"create": 1,
"delete": 0,
"email": 1,
@ -282,6 +264,7 @@
"write": 1
},
{
"cancel": 0,
"create": 1,
"delete": 0,
"email": 1,
@ -294,7 +277,7 @@
"write": 1
},
{
"apply_user_permissions": 1,
"cancel": 0,
"create": 1,
"delete": 0,
"email": 1,
@ -307,7 +290,7 @@
"write": 1
},
{
"apply_user_permissions": 1,
"cancel": 0,
"create": 1,
"delete": 0,
"email": 1,
@ -320,7 +303,7 @@
"write": 1
},
{
"apply_user_permissions": 1,
"cancel": 0,
"create": 1,
"delete": 0,
"email": 1,
@ -333,7 +316,7 @@
"write": 1
},
{
"apply_user_permissions": 1,
"cancel": 0,
"create": 1,
"delete": 0,
"email": 1,
@ -344,6 +327,18 @@
"role": "Accounts User",
"submit": 0,
"write": 1
},
{
"amend": 0,
"cancel": 0,
"create": 0,
"delete": 0,
"match": "",
"permlevel": 1,
"read": 1,
"report": 1,
"role": "All",
"submit": 0
}
]
}