[minor] fixed conflict

This commit is contained in:
Nabin Hait
2013-10-15 11:53:03 +05:30
380 changed files with 7668 additions and 5785 deletions

View File

@@ -90,8 +90,8 @@ class DocType():
webnotes.msgprint(_("""Please save the Newsletter before sending."""),
raise_exception=1)
import conf
if getattr(conf, "status", None) == "Trial":
from webnotes import conf
if (conf.get("status") or None) == "Trial":
webnotes.msgprint(_("""Sending newsletters is not allowed for Trial users, \
to prevent abuse of this feature."""), raise_exception=1)

View File

@@ -28,7 +28,7 @@ class SupportMailbox(POP3Mailbox):
new_ticket = True
ticket = add_support_communication(mail.subject, mail.content, mail.from_email,
docname=thread_id if new_ticket else None, mail=mail)
docname=None if new_ticket else thread_id, mail=mail)
if new_ticket and cint(self.email_settings.send_autoreply) and \
"mailer-daemon" not in mail.from_email.lower():
@@ -54,7 +54,7 @@ Original Query:
def auto_close_tickets(self):
webnotes.conn.sql("""update `tabSupport Ticket` set status = 'Closed'
where status = 'Waiting for Customer'
where status = 'Replied'
and date_sub(curdate(),interval 15 Day) > modified""")
def get_support_mails():
@@ -81,7 +81,7 @@ def add_support_communication(subject, content, sender, docname=None, mail=None)
make(content=content, sender=sender, subject = subject,
doctype="Support Ticket", name=ticket.doc.name,
date=mail.date if mail else today())
date=mail.date if mail else today(), sent_or_received="Received")
if mail:
mail.save_attachments_in_doc(ticket.doc)

View File

@@ -14,7 +14,7 @@ class DocType(TransactionBase):
def get_sender(self, comm):
return webnotes.conn.get_value('Email Settings',None,'support_email')
def get_subject(self, comm):
return '[' + self.doc.name + '] ' + (comm.subject or 'No Subject Specified')
@@ -35,16 +35,7 @@ class DocType(TransactionBase):
if self.doc.status == "Closed":
from webnotes.widgets.form.assign_to import clear
clear(self.doc.doctype, self.doc.name)
def on_communication(self, comm):
if comm.sender == self.get_sender(comm) or \
webnotes.conn.get_value("Profile", extract_email_id(comm.sender), "user_type")=="System User":
self.doc.status = "Waiting for Customer"
else:
self.doc.status = "Open"
self.update_status()
self.doc.save()
def set_lead_contact(self, email_id):
import email.utils
email_id = email.utils.parseaddr(email_id)

View File

@@ -2,7 +2,7 @@
{
"creation": "2013-02-01 10:36:25",
"docstatus": 0,
"modified": "2013-09-10 10:54:02",
"modified": "2013-10-03 16:45:41",
"modified_by": "Administrator",
"owner": "Administrator"
},
@@ -71,7 +71,7 @@
"no_copy": 1,
"oldfieldname": "status",
"oldfieldtype": "Select",
"options": "\nOpen\nTo Reply\nWaiting for Customer\nHold\nClosed",
"options": "Open\nReplied\nHold\nClosed",
"read_only": 0,
"reqd": 0,
"search_index": 1