Show bulk limit error before sending

This commit is contained in:
Pratik Vyas 2015-05-11 14:29:52 +05:30
parent 4439493232
commit 2fb0654f97

View File

@ -7,6 +7,7 @@ import frappe
import frappe.utils
from frappe import throw, _
from frappe.model.document import Document
from frappe.email.bulk import check_bulk_limit
import erpnext.tasks
class Newsletter(Document):
@ -72,6 +73,7 @@ class Newsletter(Document):
def validate_send(self):
if self.get("__islocal"):
throw(_("Please save the Newsletter before sending"))
check_bulk_limit(self.recipients)
@frappe.whitelist()
def get_lead_options():