diff --git a/hr/doctype/job_applicant/job_applicant.js b/hr/doctype/job_applicant/job_applicant.js index 9aff6057641..f82da11f07f 100644 --- a/hr/doctype/job_applicant/job_applicant.js +++ b/hr/doctype/job_applicant/job_applicant.js @@ -16,7 +16,7 @@ cur_frm.cscript = { }, make_listing: function(doc) { cur_frm.communication_view = new wn.views.CommunicationList({ - list: wn.model.get("Communication", {"job_applicant": doc.name}), + list: wn.model.get("Communication", {"parent": doc.name, "parenttype": "Job Applicant"}), parent: cur_frm.fields_dict['thread_html'].wrapper, doc: doc, recipients: doc.email_id diff --git a/patches/september_2013/p01_update_communication.py b/patches/september_2013/p01_update_communication.py index c3bd61b4025..d840c801f9b 100644 --- a/patches/september_2013/p01_update_communication.py +++ b/patches/september_2013/p01_update_communication.py @@ -7,4 +7,9 @@ def execute(): set parenttype=%s, parentfield='communications', parent=`%s` where ifnull(`%s`, '')!=''""" % ("%s", fieldname, fieldname), doctype) + + webnotes.reload_doc("core", "doctype", "communication") + + webnotes.conn.sql("""update tabCommunication set communication_date = creation where + ifnull(communication_date, '')='' """) \ No newline at end of file diff --git a/selling/doctype/lead/lead.js b/selling/doctype/lead/lead.js index 40887393889..3bc357c474c 100644 --- a/selling/doctype/lead/lead.js +++ b/selling/doctype/lead/lead.js @@ -36,7 +36,90 @@ erpnext.LeadController = wn.ui.form.Controller.extend({ this.frm.dashboard.reset(doc); if(!doc.__islocal) { - if(doc.status=="Converted") { + if(doc.status=="Converted") {// Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. +// License: GNU General Public License v3. See license.txt + +cur_frm.fields_dict.customer.get_query = function(doc,cdt,cdn) { + return{ query:"controllers.queries.customer_query" } } + +wn.provide("erpnext.support"); +// TODO commonify this code +erpnext.support.CustomerIssue = wn.ui.form.Controller.extend({ + customer: function() { + var me = this; + if(this.frm.doc.customer) { + return this.frm.call({ + doc: this.frm.doc, + method: "set_customer_defaults", + }); + } + } +}); + +$.extend(cur_frm.cscript, new erpnext.support.CustomerIssue({frm: cur_frm})); + +$.extend(cur_frm.cscript, { + onload: function(doc, dt, dn) { + if(in_list(user_roles,'System Manager')) { + cur_frm.footer.help_area.innerHTML = '
Email Settings
\
+ Integrate incoming support emails to Support Ticket