fix in support ticket and email settings
This commit is contained in:
parent
a872d81983
commit
2bc141f5db
@ -35,8 +35,8 @@ class DocType:
|
||||
"""
|
||||
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 @@ class DocType:
|
||||
|
||||
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')
|
||||
|
@ -140,9 +140,9 @@ class SupportMailbox(POP3Mailbox):
|
||||
"""
|
||||
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.
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user