mirror of
https://github.com/frappe/erpnext.git
synced 2026-06-01 19:29:10 +00:00
[minor] communication, webnotes/erpnext#790
This commit is contained in:
@@ -88,5 +88,4 @@ def update_feed(controller, method=None):
|
|||||||
if method in ['on_update', 'on_submit']:
|
if method in ['on_update', 'on_submit']:
|
||||||
subject, color = feed_dict.get(doc.doctype, [None, None])
|
subject, color = feed_dict.get(doc.doctype, [None, None])
|
||||||
if subject:
|
if subject:
|
||||||
from webnotes.utils import encode_dict
|
make_feed('', doc.doctype, doc.name, doc.owner, subject % doc.fields, color)
|
||||||
make_feed('', doc.doctype, doc.name, doc.owner, subject % encode_dict(doc.fields.copy()), color)
|
|
||||||
|
|||||||
@@ -62,11 +62,11 @@ erpnext.selling.QuotationController = erpnext.selling.SellingController.extend({
|
|||||||
|
|
||||||
if (!doc.__islocal) {
|
if (!doc.__islocal) {
|
||||||
cur_frm.communication_view = new wn.views.CommunicationList({
|
cur_frm.communication_view = new wn.views.CommunicationList({
|
||||||
list: wn.model.get("Communication", {"quotation": doc.name}),
|
list: wn.model.get("Communication", {"parent": doc.name, "parenttype": "Quotation"}),
|
||||||
parent: cur_frm.fields_dict.communication_html.wrapper,
|
parent: cur_frm.fields_dict.communication_html.wrapper,
|
||||||
doc: doc,
|
doc: doc,
|
||||||
recipients: doc.contact_email
|
recipients: doc.contact_email
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
this.quotation_to();
|
this.quotation_to();
|
||||||
|
|||||||
@@ -3,7 +3,7 @@
|
|||||||
|
|
||||||
from __future__ import unicode_literals
|
from __future__ import unicode_literals
|
||||||
import webnotes
|
import webnotes
|
||||||
from webnotes.utils import cstr, cint
|
from webnotes.utils import cstr, cint, decode_dict
|
||||||
from webnotes.utils.email_lib import sendmail
|
from webnotes.utils.email_lib import sendmail
|
||||||
from webnotes.utils.email_lib.receive import POP3Mailbox
|
from webnotes.utils.email_lib.receive import POP3Mailbox
|
||||||
from core.doctype.communication.communication import make
|
from core.doctype.communication.communication import make
|
||||||
@@ -31,14 +31,15 @@ class SupportMailbox(POP3Mailbox):
|
|||||||
ticket.doc.save()
|
ticket.doc.save()
|
||||||
|
|
||||||
else:
|
else:
|
||||||
ticket = webnotes.bean([{
|
ticket = webnotes.bean([decode_dict({
|
||||||
"doctype":"Support Ticket",
|
"doctype":"Support Ticket",
|
||||||
"description": mail.content,
|
"description": mail.content,
|
||||||
"subject": mail.subject,
|
"subject": mail.subject,
|
||||||
"raised_by": mail.from_email,
|
"raised_by": mail.from_email,
|
||||||
"content_type": mail.content_type,
|
"content_type": mail.content_type,
|
||||||
"status": "Open",
|
"status": "Open",
|
||||||
}])
|
})])
|
||||||
|
|
||||||
ticket.insert()
|
ticket.insert()
|
||||||
new_ticket = True
|
new_ticket = True
|
||||||
|
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ wn.require('app/controllers/js/contact_address_common.js');
|
|||||||
|
|
||||||
cur_frm.cscript.refresh = function(doc) {
|
cur_frm.cscript.refresh = function(doc) {
|
||||||
cur_frm.communication_view = new wn.views.CommunicationList({
|
cur_frm.communication_view = new wn.views.CommunicationList({
|
||||||
list: wn.model.get("Communication", {"contact": doc.name}),
|
list: wn.model.get("Communication", {"parent": doc.name, "parenttype": "Contact"}),
|
||||||
parent: cur_frm.fields_dict.communication_html.wrapper,
|
parent: cur_frm.fields_dict.communication_html.wrapper,
|
||||||
doc: doc,
|
doc: doc,
|
||||||
recipients: doc.email_id
|
recipients: doc.email_id
|
||||||
|
|||||||
Reference in New Issue
Block a user