mirror of
https://github.com/frappe/erpnext.git
synced 2026-05-26 00:14:50 +00:00
support ticket response deprecated, moved to communication
This commit is contained in:
@@ -0,0 +1,26 @@
|
||||
import webnotes
|
||||
import email.utils
|
||||
|
||||
def execute():
|
||||
webnotes.conn.commit()
|
||||
for d in webnotes.conn.sql("""select owner, creation, modified, modified_by, parent,
|
||||
from_email, mail from `tabSupport Ticket Response`""", as_dict=1):
|
||||
c = webnotes.doc("Communication")
|
||||
c.creation = d.creation
|
||||
c.owner = d.owner
|
||||
c.modified = d.modified
|
||||
c.modified_by = d.modified_by
|
||||
c.naming_series = "COMM-"
|
||||
c.subject = "response to Support Ticket: " + d.parent
|
||||
c.content = d.mail
|
||||
c.email_address = d.from_email
|
||||
c.support_ticket = d.parent
|
||||
email_addr = email.utils.parseaddr(c.email_address)[1]
|
||||
c.contact = webnotes.conn.get_value("Contact", {"email_id": email_addr}, "name") or None
|
||||
c.lead = webnotes.conn.get_value("Lead", {"email_id": email_addr}, "name") or None
|
||||
c.communication_medium = "Email"
|
||||
webnotes.conn.begin()
|
||||
c.save(1, keep_timestamps=True)
|
||||
webnotes.conn.commit()
|
||||
|
||||
webnotes.delete_doc("DocType", "Support Ticket Response")
|
||||
@@ -679,4 +679,8 @@ patch_list = [
|
||||
'patch_module': 'patches.november_2012',
|
||||
'patch_file': 'remove_old_unbilled_items_report',
|
||||
},
|
||||
{
|
||||
'patch_module': 'patches.november_2012',
|
||||
'patch_file': 'support_ticket_response_to_communication',
|
||||
},
|
||||
]
|
||||
Reference in New Issue
Block a user