Show bulk limit error before sending
This commit is contained in:
parent
4439493232
commit
2fb0654f97
@ -7,6 +7,7 @@ import frappe
|
|||||||
import frappe.utils
|
import frappe.utils
|
||||||
from frappe import throw, _
|
from frappe import throw, _
|
||||||
from frappe.model.document import Document
|
from frappe.model.document import Document
|
||||||
|
from frappe.email.bulk import check_bulk_limit
|
||||||
import erpnext.tasks
|
import erpnext.tasks
|
||||||
|
|
||||||
class Newsletter(Document):
|
class Newsletter(Document):
|
||||||
@ -72,6 +73,7 @@ class Newsletter(Document):
|
|||||||
def validate_send(self):
|
def validate_send(self):
|
||||||
if self.get("__islocal"):
|
if self.get("__islocal"):
|
||||||
throw(_("Please save the Newsletter before sending"))
|
throw(_("Please save the Newsletter before sending"))
|
||||||
|
check_bulk_limit(self.recipients)
|
||||||
|
|
||||||
@frappe.whitelist()
|
@frappe.whitelist()
|
||||||
def get_lead_options():
|
def get_lead_options():
|
||||||
|
Loading…
x
Reference in New Issue
Block a user