Parcourir la source

Show all recipients in sent-to message

version-14
Nabin Hait il y a 10 ans
Parent
révision
f7016664cc
3 fichiers modifiés avec 6 ajouts et 3 suppressions
  1. +4
    -1
      frappe/core/doctype/communication/communication.py
  2. +1
    -1
      frappe/email/doctype/email_account/test_email_account.py
  3. +1
    -1
      frappe/public/js/frappe/views/communication.js

+ 4
- 1
frappe/core/doctype/communication/communication.py Voir le fichier

@@ -254,7 +254,10 @@ def make(doctype=None, name=None, content=None, subject=None, sent_or_received =
recipients = comm.get_recipients() recipients = comm.get_recipients()
comm.send(print_html, print_format, attachments, send_me_a_copy=send_me_a_copy, recipients=recipients) comm.send(print_html, print_format, attachments, send_me_a_copy=send_me_a_copy, recipients=recipients)


return ", ".join(recipients) if recipients else None
return {
"name": comm.name,
"recipients": ", ".join(recipients) if recipients else None
}


@frappe.whitelist() @frappe.whitelist()
def get_convert_to(): def get_convert_to():


+ 1
- 1
frappe/email/doctype/email_account/test_email_account.py Voir le fichier

@@ -90,7 +90,7 @@ class TestEmailAccount(unittest.TestCase):
# send # send
sent_name = make(subject = "Test", content="test content", sent_name = make(subject = "Test", content="test content",
recipients="test_receiver@example.com", sender="test@example.com", recipients="test_receiver@example.com", sender="test@example.com",
send_email=True)
send_email=True)["name"]


sent_mail = email.message_from_string(frappe.get_last_doc("Bulk Email").message) sent_mail = email.message_from_string(frappe.get_last_doc("Bulk Email").message)
with open(os.path.join(os.path.dirname(__file__), "test_mails", "reply-1.raw"), "r") as f: with open(os.path.join(os.path.dirname(__file__), "test_mails", "reply-1.raw"), "r") as f:


+ 1
- 1
frappe/public/js/frappe/views/communication.js Voir le fichier

@@ -328,7 +328,7 @@ frappe.views.CommunicationComposer = Class.extend({
callback: function(r) { callback: function(r) {
if(!r.exc) { if(!r.exc) {
if(form_values.send_email) if(form_values.send_email)
msgprint(__("Email sent to {0}", [r.message]));
msgprint(__("Email sent to {0}", [r.message["recipients"]]));
me.dialog.hide(); me.dialog.hide();


if (cur_frm) { if (cur_frm) {


Chargement…
Annuler
Enregistrer