[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

View File

@@ -2,7 +2,7 @@
{
"creation": "2013-05-06 14:25:21",
"docstatus": 0,
"modified": "2013-05-06 14:32:47",
"modified": "2013-10-09 12:23:27",
"modified_by": "Administrator",
"owner": "Administrator"
},
@@ -10,7 +10,7 @@
"doctype": "Report",
"is_standard": "Yes",
"name": "__common__",
"query": "SELECT\n ms_item.scheduled_date as \"Schedule Date:Date:120\",\n\tms_item.item_code as \"Item Code:Link/Item:120\",\n\tms_item.item_name as \"Item Name::120\",\n\tms_item.serial_no as \"Serial No::120\",\n\tms_item.incharge_name as \"Incharge::120\",\n\tms.customer_name as \"Customer:Link/Customer:120\",\n\tms.address_display as \"Customer Address::120\",\n\tms.sales_order_no as \"Sales Order:Link/Sales Order:120\",\n\tms.company as \"Company:Link/Company:120\"\n\t\nFROM\n\t`tabMaintenance Schedule` ms, `tabMaintenance Schedule Detail` ms_item\nWHERE\n\tms.name = ms_item.parent and ms.docstatus = 1\nORDER BY\n\tms_item.scheduled_date asc, ms_item.item_code asc",
"query": "SELECT\n ms_sch.scheduled_date as \"Schedule Date:Date:120\",\n\tms_sch.item_code as \"Item Code:Link/Item:120\",\n\tms_sch.item_name as \"Item Name::120\",\n\tms_sch.serial_no as \"Serial No::120\",\n\tms_sch.incharge_name as \"Incharge::120\",\n\tms.customer_name as \"Customer:Link/Customer:120\",\n\tms.address_display as \"Customer Address::120\",\n\tms_item.prevdoc_docname as \"Sales Order:Link/Sales Order:120\",\n\tms.company as \"Company:Link/Company:120\"\n\t\nFROM\n\t`tabMaintenance Schedule` ms, \n `tabMaintenance Schedule Detail` ms_sch, \n `tabMaintenance Schedule Item` ms_item\nWHERE\n\tms.name = ms_sch.parent and ms.name = ms_item.parent and ms.docstatus = 1\nORDER BY\n\tms_sch.scheduled_date asc, ms_sch.item_code asc",
"ref_doctype": "Maintenance Schedule",
"report_name": "Maintenance Schedules",
"report_type": "Query Report"