From ca39b180f5c0a7fbac9b14d238f0e7e28ca3fde6 Mon Sep 17 00:00:00 2001 From: Anand Doshi Date: Thu, 15 Dec 2011 15:40:15 +0530 Subject: [PATCH] patch to remove old control panel email settings --- erpnext/patches/remove_old_cp_email_settings.py | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 erpnext/patches/remove_old_cp_email_settings.py diff --git a/erpnext/patches/remove_old_cp_email_settings.py b/erpnext/patches/remove_old_cp_email_settings.py new file mode 100644 index 0000000000..6af0d102ba --- /dev/null +++ b/erpnext/patches/remove_old_cp_email_settings.py @@ -0,0 +1,15 @@ +def execute(): + """ + remove control panel email settings if automail.webnotestech.com + """ + from webnotes.model.doc import Document + cp = Document('Control Panel') + if cp: + if cp.outgoing_mail_server == 'mail.webnotestech.com': + cp.outgoing_mail_server = None; + cp.mail_login = None; + cp.mail_password = None; + cp.mail_port = None; + cp.auto_email_id = 'automail@erpnext.com' + cp.save() +