frappe/frappe#478 erpnext install works

This commit is contained in:
Rushabh Mehta
2014-04-02 18:09:34 +05:30
parent 943e614810
commit f191f854cd
55 changed files with 165 additions and 167 deletions

View File

@@ -10,12 +10,11 @@ from frappe import msgprint, throw, _
from frappe.model.document import Document
class Newsletter(Document):
def onload(self):
if self.email_sent:
self.set("__status_count", dict(frappe.db.sql("""select status, count(*))
self.set("__status_count", dict(frappe.db.sql("""select status, count(*)
from `tabBulk Email` where ref_doctype=%s and ref_docname=%s
group by status""", (self.doctype, self.name))) or None
group by status""", (self.doctype, self.name))) or None)
def test_send(self, doctype="Lead"):
self.recipients = self.test_email_id.split(",")

View File

@@ -7,6 +7,8 @@ from __future__ import unicode_literals
import frappe
from frappe.model.document import Document
from frappe.utils.email_lib.receive import POP3Mailbox
import _socket, poplib
class SupportEmailSettings(Document):
@@ -14,10 +16,7 @@ class SupportEmailSettings(Document):
"""
Checks support ticket email settings
"""
if self.sync_support_mails and self.mail_server:
from frappe.utils.email_lib.receive import POP3Mailbox
import _socket, poplib
if self.sync_support_mails and self.mail_server:
inc_email = frappe.get_doc('Incoming Email Settings')
# inc_email.encode()
inc_email.host = self.mail_server