fix: Made Campaign for field mandatory
This commit is contained in:
parent
88de00fb94
commit
4c7ac65db1
@ -52,7 +52,8 @@
|
||||
"fieldtype": "Select",
|
||||
"in_list_view": 1,
|
||||
"label": "Email Campaign For ",
|
||||
"options": "\nLead\nContact"
|
||||
"options": "\nLead\nContact",
|
||||
"reqd": 1
|
||||
},
|
||||
{
|
||||
"fieldname": "recipient",
|
||||
@ -69,7 +70,7 @@
|
||||
"options": "User"
|
||||
}
|
||||
],
|
||||
"modified": "2019-07-12 13:47:37.261213",
|
||||
"modified": "2019-11-11 17:18:47.342839",
|
||||
"modified_by": "Administrator",
|
||||
"module": "CRM",
|
||||
"name": "Email Campaign",
|
||||
|
@ -73,13 +73,13 @@ def send_mail(entry, email_campaign):
|
||||
|
||||
email_template = frappe.get_doc("Email Template", entry.get("email_template"))
|
||||
sender = frappe.db.get_value("User", email_campaign.get("sender"), 'email')
|
||||
context = { "doc":frappe.get_doc(email_campaign.email_campaign_for,email_campaign.recipient) }
|
||||
context = {"doc": frappe.get_doc(email_campaign.email_campaign_for, email_campaign.recipient)}
|
||||
# send mail and link communication to document
|
||||
comm = make(
|
||||
doctype = "Email Campaign",
|
||||
name = email_campaign.name,
|
||||
subject = email_template.get("subject"),
|
||||
content = frappe.render_template(email_template.get("response"),context),
|
||||
content = frappe.render_template(email_template.get("response"), context),
|
||||
sender = sender,
|
||||
recipients = recipient,
|
||||
communication_medium = "Email",
|
||||
|
Loading…
x
Reference in New Issue
Block a user