Email settings check on save
This commit is contained in:
parent
d3db70bb72
commit
69cfc5566a
13
erpnext/patches/jan_mar_2012/email_settings_reload.py
Normal file
13
erpnext/patches/jan_mar_2012/email_settings_reload.py
Normal file
@ -0,0 +1,13 @@
|
||||
def execute():
|
||||
"""
|
||||
* Change type of mail_port field to int
|
||||
* reload email settings
|
||||
"""
|
||||
import webnotes
|
||||
webnotes.conn.sql("""
|
||||
UPDATE `tabDocField` SET fieldtype='Int'
|
||||
WHERE parent = 'Email Settings' AND fieldname = 'mail_port'
|
||||
""")
|
||||
|
||||
from webnotes.modules.module_manager import reload_doc
|
||||
reload_doc('setup', 'doctype', 'email_settings')
|
@ -45,4 +45,9 @@ patch_list = [
|
||||
'patch_file': 'doclabel_in_doclayer',
|
||||
'description': "Show DocType Labels instead of DocType names in Customize Form View"
|
||||
},
|
||||
{
|
||||
'patch_module': 'patches.jan_mar_2012',
|
||||
'patch_file': 'email_settings_reload',
|
||||
'description': "Change type of mail_port field to Int and reload email_settings doctype"
|
||||
},
|
||||
]
|
||||
|
@ -71,7 +71,7 @@ class DocType:
|
||||
"""
|
||||
Checks support ticket email settings
|
||||
"""
|
||||
if self.doc.support_host:
|
||||
if self.doc.sync_support_mails and self.doc.support_host:
|
||||
from webnotes.utils.email_lib.receive import POP3Mailbox
|
||||
from webnotes.model.doc import Document
|
||||
import _socket, poplib
|
||||
|
Loading…
x
Reference in New Issue
Block a user