[communication] [minor] cleaed model

This commit is contained in:
Rushabh Mehta
2013-09-02 17:04:27 +05:30
parent 04c4e2aea3
commit 96690ebd0f
21 changed files with 92 additions and 51 deletions

View File

@@ -46,7 +46,7 @@ class SupportMailbox(POP3Mailbox):
make(content=mail.content, sender=mail.from_email, subject = ticket.doc.subject,
doctype="Support Ticket", name=ticket.doc.name,
lead = ticket.doc.lead, contact=ticket.doc.contact, date=mail.date)
date=mail.date)
if new_ticket and cint(self.email_settings.send_autoreply) and \
"mailer-daemon" not in mail.from_email.lower():

View File

@@ -11,9 +11,6 @@ class DocType(TransactionBase):
def __init__(self, doc, doclist=[]):
self.doc = doc
self.doclist = doclist
def onload(self):
self.add_communication_list()
def get_sender(self, comm):
return webnotes.conn.get_value('Email Settings',None,'support_email')
@@ -53,7 +50,7 @@ class DocType(TransactionBase):
if not self.doc.company:
self.doc.company = webnotes.conn.get_value("Lead", self.doc.lead, "company") or \
webnotes.conn.get_default("company")
def on_trash(self):
webnotes.conn.sql("""update `tabCommunication` set support_ticket=NULL
where support_ticket=%s""", (self.doc.name,))

View File

@@ -2,7 +2,7 @@
{
"creation": "2013-02-01 10:36:25",
"docstatus": 0,
"modified": "2013-08-28 18:29:06",
"modified": "2013-09-02 16:24:24",
"modified_by": "Administrator",
"owner": "Administrator"
},
@@ -261,6 +261,14 @@
"hidden": 1,
"label": "Content Type"
},
{
"doctype": "DocField",
"fieldname": "communications",
"fieldtype": "Table",
"hidden": 1,
"label": "Communications",
"options": "Communication"
},
{
"cancel": 0,
"doctype": "DocPerm",