fix in support ticket and email settings
diff --git a/erpnext/setup/doctype/email_settings/email_settings.py b/erpnext/setup/doctype/email_settings/email_settings.py
index 0f930bc..c670b31 100644
--- a/erpnext/setup/doctype/email_settings/email_settings.py
+++ b/erpnext/setup/doctype/email_settings/email_settings.py
@@ -35,8 +35,8 @@
"""
Update value in control panel
"""
- if self.doc.fields.get(key):
- webnotes.conn.set_value('Control Panel', None, key, self.doc.fields[key])
+ webnotes.conn.set_value('Control Panel', None, key,
+ self.doc.fields.get(key))
def validate(self):
"""
@@ -117,19 +117,7 @@
def on_update(self):
"""
- Sets or cancels the event in the scheduler
+ update control panel
"""
- # update control panel
for f in ('outgoing_mail_server', 'mail_login', 'mail_password', 'auto_email_id', 'mail_port', 'use_ssl'):
self.set_cp_value(f)
-
- # setup scheduler for support emails
- if cint(self.doc.sync_support_mails):
- if not (self.doc.support_host and self.doc.support_username and self.doc.support_password):
- webnotes.msgprint("You must give the incoming POP3 settings for support emails to activiate mailbox integration", raise_exception=1)
-
- from webnotes.utils.scheduler import set_event
- set_event('support.doctype.support_ticket.get_support_mails', 60*5, 1)
- else:
- from webnotes.utils.scheduler import cancel_event
- cancel_event('support.doctype.support_ticket.get_support_mails')
diff --git a/erpnext/support/doctype/support_ticket/__init__.py b/erpnext/support/doctype/support_ticket/__init__.py
index 2a6f33c..557dbae 100644
--- a/erpnext/support/doctype/support_ticket/__init__.py
+++ b/erpnext/support/doctype/support_ticket/__init__.py
@@ -140,9 +140,9 @@
"""
Send auto reply to emails
"""
- signature = self.email_settings.support_signature or ''
+ signature = self.email_settings.fields.get('support_signature') or ''
- response = self.email_settings.support_autoreply or ("""
+ response = self.email_settings.fields.get('support_autoreply') or ("""
A new Ticket has been raised for your query. If you have any additional information, please
reply back to this mail.