fixed conflict
This commit is contained in:
commit
587ac5c941
BIN
favicon.ico
Normal file
BIN
favicon.ico
Normal file
Binary file not shown.
After Width: | Height: | Size: 1.4 KiB |
BIN
master.sql.gz
BIN
master.sql.gz
Binary file not shown.
@ -1,13 +1,12 @@
|
||||
# REMEMBER to update this
|
||||
# ========================
|
||||
|
||||
last_patch = 329
|
||||
last_patch = 330
|
||||
|
||||
#-------------------------------------------
|
||||
|
||||
def execute(patch_no):
|
||||
import webnotes
|
||||
from webnotes.modules.import_module import import_from_files
|
||||
from webnotes.modules.module_manager import reload_doc
|
||||
|
||||
from webnotes.model.code import get_obj
|
||||
@ -1299,11 +1298,36 @@ def execute(patch_no):
|
||||
if cint(webnotes.conn.get_value('Control Panel',None,'sync_with_gateway')):
|
||||
reload_doc('server_tools','page','billing')
|
||||
elif patch_no == 327:
|
||||
# patch for support email settings now moved to email settings
|
||||
reload_doc('setup','doctype','email_settings')
|
||||
|
||||
# map fields from support to email settings
|
||||
field_map = {
|
||||
'support_email': 'email',
|
||||
'support_host':'host',
|
||||
'support_username': 'username',
|
||||
'support_password': 'password',
|
||||
'support_use_ssl': 'use_ssl',
|
||||
'sync_support_mails': 'integrate_incoming',
|
||||
'signature': 'support_signature'
|
||||
}
|
||||
|
||||
for key in field_map:
|
||||
webnotes.conn.set_value('Email Settings',None,key, \
|
||||
webnotes.conn.get_value('Support Email Settings',None,field_map[key]))
|
||||
|
||||
# delete support email settings
|
||||
from webnotes.model import delete_doc
|
||||
delete_doc('DocType', 'Support Email Settings')
|
||||
|
||||
reload_doc('support','doctype','support_ticket')
|
||||
sql("delete from tabDocField where fieldname='problem_description' and parent='Support Ticket'")
|
||||
elif patch_no == 328:
|
||||
if webnotes.conn.get_value('Control Panel', None, 'account_id') != 'axjanak2011':
|
||||
sql("delete from `tabDocField` where fieldname = 'supplier_status' and parent = 'Supplier'")
|
||||
elif patch_no == 328:
|
||||
elif patch_no == 329:
|
||||
from index_patch import create_proper_index
|
||||
create_proper_index()
|
||||
elif patch_no == 329:
|
||||
elif patch_no == 330:
|
||||
reload_doc('utilities', 'doctype', 'rename_tool')
|
||||
reload_doc('utilities', 'doctype', 'bulk_rename_tool')
|
||||
|
@ -1,44 +1,42 @@
|
||||
# Please edit this list and import only required elements
|
||||
import webnotes
|
||||
|
||||
from webnotes.utils import add_days, add_months, add_years, cint, cstr, date_diff, default_fields, flt, fmt_money, formatdate, generate_hash, getTraceback, get_defaults, get_first_day, get_last_day, getdate, has_common, month_name, now, nowdate, replace_newlines, sendmail, set_default, str_esc_quote, user_format, validate_email_add
|
||||
from webnotes.model import db_exists
|
||||
from webnotes.model.doc import Document, addchild, removechild, getchildren, make_autoname, SuperDocType
|
||||
from webnotes.model.doclist import getlist, copy_doclist
|
||||
from webnotes.model.code import get_obj, get_server_obj, run_server_obj, updatedb, check_syntax
|
||||
from webnotes import session, form, is_testing, msgprint, errprint
|
||||
|
||||
set = webnotes.conn.set
|
||||
sql = webnotes.conn.sql
|
||||
get_value = webnotes.conn.get_value
|
||||
in_transaction = webnotes.conn.in_transaction
|
||||
convert_to_lists = webnotes.conn.convert_to_lists
|
||||
|
||||
# -----------------------------------------------------------------------------------------
|
||||
|
||||
from webnotes.utils import cint, cstr
|
||||
|
||||
class DocType:
|
||||
def __init__(self,doc,doclist):
|
||||
self.doc,self.doclist = doc,doclist
|
||||
def __init__(self,doc,doclist):
|
||||
self.doc,self.doclist = doc,doclist
|
||||
|
||||
def set_vals(self):
|
||||
res = sql("select field, value from `tabSingles` where doctype = 'Control Panel' and field IN ('outgoing_mail_server','mail_login','mail_password','auto_email_id','mail_port','use_ssl')")
|
||||
ret = {}
|
||||
for r in res:
|
||||
ret[cstr(r[0])]=r[1] and cstr(r[1]) or ''
|
||||
|
||||
return str(ret)
|
||||
def set_vals(self):
|
||||
res = sql("select field, value from `tabSingles` where doctype = 'Control Panel' and field IN ('outgoing_mail_server','mail_login','mail_password','auto_email_id','mail_port','use_ssl')")
|
||||
ret = {}
|
||||
for r in res:
|
||||
ret[cstr(r[0])]=r[1] and cstr(r[1]) or ''
|
||||
|
||||
return str(ret)
|
||||
|
||||
def on_update(self):
|
||||
if self.doc.outgoing_mail_server:
|
||||
sql("update `tabSingles` set value ='%s' where doctype = 'Control Panel' and field = 'outgoing_mail_server'"%self.doc.outgoing_mail_server)
|
||||
if self.doc.mail_login:
|
||||
sql("update `tabSingles` set value ='%s' where doctype = 'Control Panel' and field = 'mail_login'"%self.doc.mail_login)
|
||||
if self.doc.mail_password:
|
||||
sql("update `tabSingles` set value ='%s' where doctype = 'Control Panel' and field = 'mail_password'"%self.doc.mail_password)
|
||||
if self.doc.auto_email_id:
|
||||
sql("update `tabSingles` set value ='%s' where doctype = 'Control Panel' and field = 'auto_email_id'"%self.doc.auto_email_id)
|
||||
if self.doc.mail_port:
|
||||
sql("update `tabSingles` set value ='%s' where doctype = 'Control Panel' and field = 'mail_port'"%self.doc.mail_port)
|
||||
if self.doc.use_ssl:
|
||||
sql("update `tabSingles` set value ='%s' where doctype = 'Control Panel' and field = 'use_ssl'"%self.doc.use_ssl)
|
||||
def set_cp_value(self, key):
|
||||
"""
|
||||
Update value in control panel
|
||||
"""
|
||||
if self.doc.fields.get(key):
|
||||
webnotes.conn.set_value('Control Panel', None, key, self.doc.fields[key])
|
||||
|
||||
def on_update(self):
|
||||
"""
|
||||
Sets or cancels the event in the scheduler
|
||||
"""
|
||||
# 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')
|
@ -5,14 +5,14 @@
|
||||
{
|
||||
'creation': '2010-08-08 17:08:59',
|
||||
'docstatus': 0,
|
||||
'modified': '2011-01-04 11:21:25',
|
||||
'modified_by': 'umair@iwebnotes.com',
|
||||
'modified': '2011-07-25 15:03:51',
|
||||
'modified_by': 'Administrator',
|
||||
'owner': 'harshada@webnotestech.com'
|
||||
},
|
||||
|
||||
# These values are common for all DocType
|
||||
{
|
||||
'_last_update': '1307707462',
|
||||
'_last_update': '1311586371',
|
||||
'allow_copy': 1,
|
||||
'allow_email': 1,
|
||||
'allow_print': 1,
|
||||
@ -24,7 +24,7 @@
|
||||
'name': '__common__',
|
||||
'section_style': 'Simple',
|
||||
'server_code_error': ' ',
|
||||
'version': 27
|
||||
'version': 34
|
||||
},
|
||||
|
||||
# These values are common for all DocField
|
||||
@ -69,12 +69,29 @@
|
||||
'idx': 2
|
||||
},
|
||||
|
||||
# DocField
|
||||
{
|
||||
'doctype': 'DocField',
|
||||
'fieldtype': 'Section Break',
|
||||
'idx': 1,
|
||||
'label': 'Outgoing Mails'
|
||||
},
|
||||
|
||||
# DocField
|
||||
{
|
||||
'doctype': 'DocField',
|
||||
'fieldtype': 'HTML',
|
||||
'idx': 2,
|
||||
'label': '1',
|
||||
'options': '<div class="help_box">Set your outgoing mail settings here. All system generated notifications, emails will go from this mail server</div>'
|
||||
},
|
||||
|
||||
# DocField
|
||||
{
|
||||
'doctype': 'DocField',
|
||||
'fieldname': 'outgoing_mail_server',
|
||||
'fieldtype': 'Data',
|
||||
'idx': 1,
|
||||
'idx': 3,
|
||||
'label': 'Outgoing Mail Server'
|
||||
},
|
||||
|
||||
@ -83,7 +100,7 @@
|
||||
'doctype': 'DocField',
|
||||
'fieldname': 'mail_port',
|
||||
'fieldtype': 'Data',
|
||||
'idx': 2,
|
||||
'idx': 4,
|
||||
'label': 'Mail Port'
|
||||
},
|
||||
|
||||
@ -92,7 +109,7 @@
|
||||
'doctype': 'DocField',
|
||||
'fieldname': 'use_ssl',
|
||||
'fieldtype': 'Check',
|
||||
'idx': 3,
|
||||
'idx': 5,
|
||||
'label': 'Use SSL'
|
||||
},
|
||||
|
||||
@ -101,7 +118,7 @@
|
||||
'doctype': 'DocField',
|
||||
'fieldname': 'mail_login',
|
||||
'fieldtype': 'Data',
|
||||
'idx': 4,
|
||||
'idx': 6,
|
||||
'label': 'Login Id'
|
||||
},
|
||||
|
||||
@ -110,7 +127,7 @@
|
||||
'doctype': 'DocField',
|
||||
'fieldname': 'mail_password',
|
||||
'fieldtype': 'Password',
|
||||
'idx': 5,
|
||||
'idx': 7,
|
||||
'label': 'Mail Password'
|
||||
},
|
||||
|
||||
@ -119,7 +136,122 @@
|
||||
'doctype': 'DocField',
|
||||
'fieldname': 'auto_email_id',
|
||||
'fieldtype': 'Data',
|
||||
'idx': 6,
|
||||
'idx': 8,
|
||||
'label': 'Auto Email Id'
|
||||
},
|
||||
|
||||
# DocField
|
||||
{
|
||||
'description': 'Set the POP3 email settings to pull emails directly from a mailbox and create Support Tickets',
|
||||
'doctype': 'DocField',
|
||||
'fieldtype': 'Section Break',
|
||||
'idx': 9,
|
||||
'label': 'Support Ticket Mail Settings'
|
||||
},
|
||||
|
||||
# DocField
|
||||
{
|
||||
'doctype': 'DocField',
|
||||
'fieldtype': 'HTML',
|
||||
'idx': 10,
|
||||
'label': '2',
|
||||
'options': '<div class="help_box">To automatically create Support Tickets from your incoming mail, set your pop3 settings here.</div>'
|
||||
},
|
||||
|
||||
# DocField
|
||||
{
|
||||
'doctype': 'DocField',
|
||||
'fieldtype': 'Section Break',
|
||||
'idx': 11,
|
||||
'options': 'Simple'
|
||||
},
|
||||
|
||||
# DocField
|
||||
{
|
||||
'colour': 'White:FFF',
|
||||
'description': 'Check this to pull emails from your mailbox',
|
||||
'doctype': 'DocField',
|
||||
'fieldname': 'sync_support_mails',
|
||||
'fieldtype': 'Check',
|
||||
'idx': 12,
|
||||
'label': 'Sync Support Mails'
|
||||
},
|
||||
|
||||
# DocField
|
||||
{
|
||||
'colour': 'White:FFF',
|
||||
'description': 'Your support email id - must be a valid email - this is where your emails will come!',
|
||||
'doctype': 'DocField',
|
||||
'fieldname': 'support_email',
|
||||
'fieldtype': 'Data',
|
||||
'idx': 13,
|
||||
'label': 'Support Email'
|
||||
},
|
||||
|
||||
# DocField
|
||||
{
|
||||
'colour': 'White:FFF',
|
||||
'description': 'POP3 mail server (e.g. pop.gmail.com)',
|
||||
'doctype': 'DocField',
|
||||
'fieldname': 'support_host',
|
||||
'fieldtype': 'Data',
|
||||
'idx': 14,
|
||||
'label': 'POP3 Mail Server'
|
||||
},
|
||||
|
||||
# DocField
|
||||
{
|
||||
'doctype': 'DocField',
|
||||
'fieldname': 'support_use_ssl',
|
||||
'fieldtype': 'Check',
|
||||
'idx': 15,
|
||||
'label': 'Use SSL'
|
||||
},
|
||||
|
||||
# DocField
|
||||
{
|
||||
'doctype': 'DocField',
|
||||
'fieldname': 'support_username',
|
||||
'fieldtype': 'Data',
|
||||
'idx': 16,
|
||||
'label': 'User Name'
|
||||
},
|
||||
|
||||
# DocField
|
||||
{
|
||||
'doctype': 'DocField',
|
||||
'fieldname': 'support_password',
|
||||
'fieldtype': 'Password',
|
||||
'idx': 17,
|
||||
'label': 'Support Password'
|
||||
},
|
||||
|
||||
# DocField
|
||||
{
|
||||
'doctype': 'DocField',
|
||||
'fieldtype': 'Column Break',
|
||||
'idx': 18
|
||||
},
|
||||
|
||||
# DocField
|
||||
{
|
||||
'colour': 'White:FFF',
|
||||
'description': 'Signature to be appended at the end of every email',
|
||||
'doctype': 'DocField',
|
||||
'fieldname': 'support_signature',
|
||||
'fieldtype': 'Text',
|
||||
'idx': 19,
|
||||
'label': 'Signature'
|
||||
},
|
||||
|
||||
# DocField
|
||||
{
|
||||
'colour': 'White:FFF',
|
||||
'description': 'Autoreply when a new mail is received',
|
||||
'doctype': 'DocField',
|
||||
'fieldname': 'support_autoreply',
|
||||
'fieldtype': 'Text',
|
||||
'idx': 20,
|
||||
'label': 'Autoreply'
|
||||
}
|
||||
]
|
@ -13,7 +13,6 @@ sql = webnotes.conn.sql
|
||||
get_value = webnotes.conn.get_value
|
||||
in_transaction = webnotes.conn.in_transaction
|
||||
convert_to_lists = webnotes.conn.convert_to_lists
|
||||
|
||||
|
||||
# -----------------------------------------------------------------------------------------
|
||||
|
||||
@ -37,9 +36,11 @@ class DocType:
|
||||
#-----------------------
|
||||
def set_account_details(self, args):
|
||||
args = eval(args)
|
||||
#webnotes.logger.error("args in set_account_details of setup_control: " + str(args))
|
||||
|
||||
self.set_cp_defaults(args['company'], args['industry'], args['time_zone'], args['country'], args['account_name'])
|
||||
self.create_profile(args['user'], args['first_name'], args['last_name'])
|
||||
|
||||
from server_tools.gateway_utils import update_client_control
|
||||
update_client_control(args['total_users'])
|
||||
|
||||
|
||||
@ -182,7 +183,7 @@ class DocType:
|
||||
Validates if setup has been performed after database allocation
|
||||
"""
|
||||
|
||||
from server_tools.gateway_utils import update_client_control, get_total_users
|
||||
from server_tools.gateway_utils import get_total_users
|
||||
|
||||
args = eval(args)
|
||||
#webnotes.logger.error("args in set_account_details of setup_control: " + str(args))
|
||||
|
@ -1,18 +0,0 @@
|
||||
import webnotes
|
||||
from webnotes.utils import cint
|
||||
|
||||
class DocType:
|
||||
def __init__(self,dt,dn):
|
||||
self.doc, self.doctype = dt,dn
|
||||
|
||||
def on_update(self):
|
||||
"""
|
||||
Sets or cancels the event in the scheduler
|
||||
"""
|
||||
if cint(self.doc.integrate_incoming):
|
||||
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')
|
||||
|
@ -1,144 +0,0 @@
|
||||
# DocType, Support Email Settings
|
||||
[
|
||||
|
||||
# These values are common in all dictionaries
|
||||
{
|
||||
'creation': '2011-05-23 14:50:45',
|
||||
'docstatus': 0,
|
||||
'modified': '2011-05-28 09:25:53',
|
||||
'modified_by': 'Administrator',
|
||||
'owner': 'Administrator'
|
||||
},
|
||||
|
||||
# These values are common for all DocType
|
||||
{
|
||||
'_last_update': '1306554355',
|
||||
'colour': 'White:FFF',
|
||||
'doctype': 'DocType',
|
||||
'in_dialog': 1,
|
||||
'issingle': 1,
|
||||
'module': 'Setup',
|
||||
'name': '__common__',
|
||||
'read_only': 1,
|
||||
'section_style': 'Simple',
|
||||
'show_in_menu': 1,
|
||||
'version': 8
|
||||
},
|
||||
|
||||
# These values are common for all DocField
|
||||
{
|
||||
'doctype': 'DocField',
|
||||
'name': '__common__',
|
||||
'parent': 'Support Email Settings',
|
||||
'parentfield': 'fields',
|
||||
'parenttype': 'DocType',
|
||||
'permlevel': 0
|
||||
},
|
||||
|
||||
# These values are common for all DocPerm
|
||||
{
|
||||
'create': 1,
|
||||
'doctype': 'DocPerm',
|
||||
'idx': 1,
|
||||
'name': '__common__',
|
||||
'parent': 'Support Email Settings',
|
||||
'parentfield': 'permissions',
|
||||
'parenttype': 'DocType',
|
||||
'permlevel': 0,
|
||||
'read': 1,
|
||||
'role': 'System Manager',
|
||||
'write': 1
|
||||
},
|
||||
|
||||
# DocType, Support Email Settings
|
||||
{
|
||||
'doctype': 'DocType',
|
||||
'name': 'Support Email Settings'
|
||||
},
|
||||
|
||||
# DocPerm
|
||||
{
|
||||
'doctype': 'DocPerm'
|
||||
},
|
||||
|
||||
# DocField
|
||||
{
|
||||
'colour': 'White:FFF',
|
||||
'description': 'The full email id of your incoming support emails',
|
||||
'doctype': 'DocField',
|
||||
'fieldname': 'email',
|
||||
'fieldtype': 'Data',
|
||||
'idx': 1,
|
||||
'label': 'Email',
|
||||
'options': 'Email'
|
||||
},
|
||||
|
||||
# DocField
|
||||
{
|
||||
'colour': 'White:FFF',
|
||||
'description': 'By checking this, your incoming mails will automatically be integrated with the Support Ticket',
|
||||
'doctype': 'DocField',
|
||||
'fieldname': 'integrate_incoming',
|
||||
'fieldtype': 'Check',
|
||||
'idx': 2,
|
||||
'label': 'Integrate Incoming'
|
||||
},
|
||||
|
||||
# DocField
|
||||
{
|
||||
'colour': 'White:FFF',
|
||||
'description': 'Signature appended to the outgoing email (Text / HTML)',
|
||||
'doctype': 'DocField',
|
||||
'fieldname': 'signature',
|
||||
'fieldtype': 'Text',
|
||||
'idx': 3,
|
||||
'label': 'Signature'
|
||||
},
|
||||
|
||||
# DocField
|
||||
{
|
||||
'doctype': 'DocField',
|
||||
'fieldtype': 'Column Break',
|
||||
'idx': 4
|
||||
},
|
||||
|
||||
# DocField
|
||||
{
|
||||
'doctype': 'DocField',
|
||||
'fieldname': 'use_ssl',
|
||||
'fieldtype': 'Check',
|
||||
'idx': 5,
|
||||
'label': 'Use SSL'
|
||||
},
|
||||
|
||||
# DocField
|
||||
{
|
||||
'colour': 'White:FFF',
|
||||
'description': 'eg. pop.gmail.com',
|
||||
'doctype': 'DocField',
|
||||
'fieldname': 'host',
|
||||
'fieldtype': 'Data',
|
||||
'idx': 6,
|
||||
'label': 'Host'
|
||||
},
|
||||
|
||||
# DocField
|
||||
{
|
||||
'colour': 'White:FFF',
|
||||
'description': 'Support Email Id',
|
||||
'doctype': 'DocField',
|
||||
'fieldname': 'username',
|
||||
'fieldtype': 'Data',
|
||||
'idx': 7,
|
||||
'label': 'Username'
|
||||
},
|
||||
|
||||
# DocField
|
||||
{
|
||||
'doctype': 'DocField',
|
||||
'fieldname': 'password',
|
||||
'fieldtype': 'Password',
|
||||
'idx': 8,
|
||||
'label': 'Password'
|
||||
}
|
||||
]
|
@ -118,7 +118,7 @@ class DocType:
|
||||
# ------------------
|
||||
def get_current_stock(self, item_code, warehouse):
|
||||
bin = sql("select name from `tabBin` where item_code = '%s' and warehouse = '%s'" % (item_code, warehouse))
|
||||
prev_sle = bin and get_obj('Bin', bin[0][0]).get_prev_sle(self.doc.reconciliation_date,self.doc.reconciliation_time) or 0
|
||||
prev_sle = bin and get_obj('Bin', bin[0][0]).get_prev_sle(self.doc.reconciliation_date,self.doc.reconciliation_time) or {}
|
||||
stock_uom = sql("select stock_uom from `tabItem` where name = %s",item_code)
|
||||
return {'actual_qty': prev_sle.get('bin_aqat', 0), 'stock_uom': stock_uom[0][0]}
|
||||
|
||||
|
@ -6,14 +6,26 @@ class SupportMailbox(POP3Mailbox):
|
||||
def __init__(self):
|
||||
"""
|
||||
settings_doc must contain
|
||||
is_ssl, host, username, password
|
||||
use_ssl, host, username, password
|
||||
"""
|
||||
POP3Mailbox.__init__(self, 'Support Email Settings')
|
||||
from webnotes.model.doc import Document
|
||||
|
||||
# extract email settings
|
||||
self.email_settings = Document('Email Settings','Email Settings')
|
||||
|
||||
s = Document('Support Email Settings')
|
||||
s.use_ssl = self.email_settings.support_use_ssl
|
||||
s.host = self.email_settings.support_host
|
||||
s.username = self.email_settings.support_username
|
||||
s.password = self.email_settings.support_password
|
||||
|
||||
POP3Mailbox.__init__(self, s)
|
||||
|
||||
def check_mails(self):
|
||||
"""
|
||||
returns true if there are active sessions
|
||||
"""
|
||||
self.auto_close_tickets()
|
||||
return webnotes.conn.sql("select user from tabSessions where time_to_sec(timediff(now(), lastupdate)) < 1800")
|
||||
|
||||
def process_message(self, mail):
|
||||
@ -56,6 +68,39 @@ class SupportMailbox(POP3Mailbox):
|
||||
# update feed
|
||||
update_feed(d)
|
||||
|
||||
# send auto reply
|
||||
self.send_auto_reply(d)
|
||||
|
||||
def send_auto_reply(self, d):
|
||||
"""
|
||||
Send auto reply to emails
|
||||
"""
|
||||
signature = self.email_settings.support_signature
|
||||
|
||||
response = self.email_settings.support_autoreply or ("""
|
||||
A new Ticket has been raised for your query. If you have any additional information, please
|
||||
reply back to this mail.
|
||||
|
||||
We will get back to you as soon as possible
|
||||
|
||||
[This is an automatic response]
|
||||
|
||||
""" + signature)
|
||||
|
||||
from webnotes.utils.email_lib import sendmail
|
||||
|
||||
sendmail(\
|
||||
recipients = [d.raised_by], \
|
||||
sender = self.email_settings.support_email, \
|
||||
subject = '['+d.name+'] ' + d.subject, \
|
||||
msg = response)
|
||||
|
||||
def auto_close_tickets(self):
|
||||
"""
|
||||
Auto Closes Waiting for Customer Support Ticket after 15 days
|
||||
"""
|
||||
webnotes.conn.sql("update `tabSupport Ticket` set status = 'Closed' where status = 'Waiting for Customer' and date_sub(curdate(),interval 15 Day) > modified")
|
||||
|
||||
|
||||
def get_support_mails():
|
||||
"""
|
||||
@ -63,8 +108,3 @@ def get_support_mails():
|
||||
"""
|
||||
SupportMailbox().get_messages()
|
||||
|
||||
def auto_close_tickets():
|
||||
"""
|
||||
Auto Closes Waiting for Customer Support Ticket after 15 days
|
||||
"""
|
||||
webnotes.conn.sql("update `tabSupport Ticket` set status = 'Closed' where status = 'Waiting for Customer' and date_sub(curdate(),interval 15 Day) > modified")
|
||||
|
@ -20,9 +20,9 @@ $.extend(cur_frm.cscript, {
|
||||
items: [
|
||||
{
|
||||
column: 0,
|
||||
label:'Support Email Settings',
|
||||
label:'Email Settings',
|
||||
description:'Integrate your incoming support emails to support ticket',
|
||||
onclick: function() { loaddoc('Support Email Settings','Support Email Settings'); }
|
||||
onclick: function() { loaddoc('Email Settings','Email Settings'); }
|
||||
},
|
||||
]
|
||||
})
|
||||
|
@ -19,7 +19,7 @@ class DocType(TransactionBase):
|
||||
|
||||
response = self.doc.new_response + '\n\n[Please do not change the subject while responding.]'
|
||||
|
||||
signature = webnotes.conn.get_value('Support Email Settings',None,'signature')
|
||||
signature = webnotes.conn.get_value('Email Settings',None,'support_signature')
|
||||
if signature:
|
||||
response += '\n\n' + signature
|
||||
|
||||
@ -27,7 +27,7 @@ class DocType(TransactionBase):
|
||||
|
||||
sendmail(\
|
||||
recipients = [self.doc.raised_by], \
|
||||
sender=webnotes.conn.get_value('Support Email Settings',None,'email'), \
|
||||
sender=webnotes.conn.get_value('Email Settings',None,'support_email'), \
|
||||
subject=subject, \
|
||||
msg=response)
|
||||
|
||||
|
@ -3,16 +3,16 @@
|
||||
|
||||
# These values are common in all dictionaries
|
||||
{
|
||||
'creation': '2011-05-23 14:50:46',
|
||||
'creation': '2011-05-23 09:01:10',
|
||||
'docstatus': 0,
|
||||
'modified': '2011-07-06 09:25:53',
|
||||
'modified': '2011-07-25 14:45:28',
|
||||
'modified_by': 'Administrator',
|
||||
'owner': 'Administrator'
|
||||
},
|
||||
|
||||
# These values are common for all DocType
|
||||
{
|
||||
'_last_update': '1309771514',
|
||||
'_last_update': '1311584009',
|
||||
'allow_trash': 1,
|
||||
'autoname': 'SUP.######',
|
||||
'colour': 'White:FFF',
|
||||
@ -25,7 +25,7 @@
|
||||
'show_in_menu': 0,
|
||||
'subject': '%(subject)s',
|
||||
'tag_fields': 'status,allocated_to',
|
||||
'version': 150
|
||||
'version': 144
|
||||
},
|
||||
|
||||
# These values are common for all DocField
|
||||
@ -131,7 +131,7 @@
|
||||
{
|
||||
'doctype': 'DocField',
|
||||
'fieldname': 'subject',
|
||||
'fieldtype': 'Small Text',
|
||||
'fieldtype': 'Text',
|
||||
'idx': 2,
|
||||
'in_filter': 1,
|
||||
'label': 'Subject',
|
||||
@ -168,24 +168,12 @@
|
||||
'reqd': 0
|
||||
},
|
||||
|
||||
# DocField
|
||||
{
|
||||
'doctype': 'DocField',
|
||||
'fieldname': 'problem_description',
|
||||
'fieldtype': 'Text',
|
||||
'idx': 5,
|
||||
'label': 'Problem Description',
|
||||
'oldfieldname': 'problem_description',
|
||||
'oldfieldtype': 'Text',
|
||||
'permlevel': 0
|
||||
},
|
||||
|
||||
# DocField
|
||||
{
|
||||
'depends_on': 'eval:!doc.__islocal',
|
||||
'doctype': 'DocField',
|
||||
'fieldtype': 'HTML',
|
||||
'idx': 6,
|
||||
'idx': 5,
|
||||
'label': 'Thread HTML',
|
||||
'permlevel': 1
|
||||
},
|
||||
@ -196,7 +184,7 @@
|
||||
'doctype': 'DocField',
|
||||
'fieldname': 'new_response',
|
||||
'fieldtype': 'Text',
|
||||
'idx': 7,
|
||||
'idx': 6,
|
||||
'label': 'New Response',
|
||||
'permlevel': 0
|
||||
},
|
||||
@ -206,9 +194,8 @@
|
||||
'depends_on': 'eval:!doc.__islocal',
|
||||
'doctype': 'DocField',
|
||||
'fieldtype': 'Button',
|
||||
'idx': 8,
|
||||
'idx': 7,
|
||||
'label': 'Send',
|
||||
'options': 'send_response',
|
||||
'permlevel': 0
|
||||
},
|
||||
|
||||
@ -217,7 +204,7 @@
|
||||
'colour': 'White:FFF',
|
||||
'doctype': 'DocField',
|
||||
'fieldtype': 'Section Break',
|
||||
'idx': 9,
|
||||
'idx': 8,
|
||||
'label': 'Additional Info',
|
||||
'permlevel': 1
|
||||
},
|
||||
@ -227,7 +214,7 @@
|
||||
'depends_on': 'eval:!doc.__islocal',
|
||||
'doctype': 'DocField',
|
||||
'fieldtype': 'Column Break',
|
||||
'idx': 10,
|
||||
'idx': 9,
|
||||
'oldfieldtype': 'Column Break',
|
||||
'permlevel': 1,
|
||||
'width': '50%'
|
||||
@ -239,7 +226,7 @@
|
||||
'doctype': 'DocField',
|
||||
'fieldname': 'customer',
|
||||
'fieldtype': 'Link',
|
||||
'idx': 11,
|
||||
'idx': 10,
|
||||
'in_filter': 1,
|
||||
'label': 'Customer',
|
||||
'oldfieldname': 'customer',
|
||||
@ -257,7 +244,7 @@
|
||||
'doctype': 'DocField',
|
||||
'fieldname': 'customer_name',
|
||||
'fieldtype': 'Data',
|
||||
'idx': 12,
|
||||
'idx': 11,
|
||||
'in_filter': 1,
|
||||
'label': 'Customer Name',
|
||||
'oldfieldname': 'customer_name',
|
||||
@ -272,7 +259,7 @@
|
||||
'doctype': 'DocField',
|
||||
'fieldname': 'address_display',
|
||||
'fieldtype': 'Small Text',
|
||||
'idx': 13,
|
||||
'idx': 12,
|
||||
'label': 'Address',
|
||||
'permlevel': 2
|
||||
},
|
||||
@ -282,7 +269,7 @@
|
||||
'doctype': 'DocField',
|
||||
'fieldname': 'contact_display',
|
||||
'fieldtype': 'Data',
|
||||
'idx': 14,
|
||||
'idx': 13,
|
||||
'label': 'Contact Name',
|
||||
'permlevel': 2
|
||||
},
|
||||
@ -292,7 +279,7 @@
|
||||
'doctype': 'DocField',
|
||||
'fieldname': 'contact_mobile',
|
||||
'fieldtype': 'Data',
|
||||
'idx': 15,
|
||||
'idx': 14,
|
||||
'label': 'Mobile No',
|
||||
'permlevel': 2
|
||||
},
|
||||
@ -302,7 +289,7 @@
|
||||
'doctype': 'DocField',
|
||||
'fieldname': 'contact_email',
|
||||
'fieldtype': 'Data',
|
||||
'idx': 16,
|
||||
'idx': 15,
|
||||
'label': 'Contact Email',
|
||||
'oldfieldname': 'contact_no',
|
||||
'oldfieldtype': 'Data',
|
||||
@ -315,7 +302,7 @@
|
||||
'doctype': 'DocField',
|
||||
'fieldname': 'opening_date',
|
||||
'fieldtype': 'Date',
|
||||
'idx': 17,
|
||||
'idx': 16,
|
||||
'label': 'Opening Date',
|
||||
'no_copy': 1,
|
||||
'oldfieldname': 'opening_date',
|
||||
@ -328,7 +315,7 @@
|
||||
'doctype': 'DocField',
|
||||
'fieldname': 'opening_time',
|
||||
'fieldtype': 'Time',
|
||||
'idx': 18,
|
||||
'idx': 17,
|
||||
'label': 'Opening Time',
|
||||
'no_copy': 1,
|
||||
'oldfieldname': 'opening_time',
|
||||
@ -341,19 +328,18 @@
|
||||
'depends_on': 'eval:!doc.__islocal',
|
||||
'doctype': 'DocField',
|
||||
'fieldtype': 'Column Break',
|
||||
'idx': 19,
|
||||
'idx': 18,
|
||||
'oldfieldtype': 'Column Break',
|
||||
'permlevel': 1
|
||||
},
|
||||
|
||||
# DocField
|
||||
{
|
||||
'colour': 'White:FFF',
|
||||
'depends_on': 'eval:!doc.__islocal',
|
||||
'doctype': 'DocField',
|
||||
'fieldname': 'allocated_to',
|
||||
'fieldtype': 'Link',
|
||||
'idx': 20,
|
||||
'idx': 19,
|
||||
'in_filter': 1,
|
||||
'label': 'Allocated To',
|
||||
'oldfieldname': 'allocated_to',
|
||||
@ -368,8 +354,8 @@
|
||||
'depends_on': 'eval:!doc.__islocal',
|
||||
'doctype': 'DocField',
|
||||
'fieldname': 'resolution_details',
|
||||
'fieldtype': 'Small Text',
|
||||
'idx': 21,
|
||||
'fieldtype': 'Text',
|
||||
'idx': 20,
|
||||
'label': 'Resolution Details',
|
||||
'no_copy': 1,
|
||||
'oldfieldname': 'resolution_details',
|
||||
@ -379,12 +365,11 @@
|
||||
|
||||
# DocField
|
||||
{
|
||||
'colour': 'White:FFF',
|
||||
'depends_on': 'eval:!doc.__islocal',
|
||||
'doctype': 'DocField',
|
||||
'fieldname': 'resolution_date',
|
||||
'fieldtype': 'Date',
|
||||
'idx': 22,
|
||||
'idx': 21,
|
||||
'in_filter': 0,
|
||||
'label': 'Resolution Date',
|
||||
'no_copy': 1,
|
||||
@ -400,7 +385,7 @@
|
||||
'doctype': 'DocField',
|
||||
'fieldname': 'resolution_time',
|
||||
'fieldtype': 'Time',
|
||||
'idx': 23,
|
||||
'idx': 22,
|
||||
'label': 'Resolution Time',
|
||||
'oldfieldname': 'resolution_time',
|
||||
'oldfieldtype': 'Time',
|
||||
@ -414,7 +399,7 @@
|
||||
'fieldname': 'content_type',
|
||||
'fieldtype': 'Data',
|
||||
'hidden': 1,
|
||||
'idx': 24,
|
||||
'idx': 23,
|
||||
'label': 'Content Type',
|
||||
'permlevel': 0
|
||||
}
|
||||
|
@ -3,9 +3,9 @@
|
||||
|
||||
# These values are common in all dictionaries
|
||||
{
|
||||
'creation': '2011-07-08 13:30:05',
|
||||
'creation': '2011-07-08 11:14:15',
|
||||
'docstatus': 0,
|
||||
'modified': '2011-07-08 13:30:05',
|
||||
'modified': '2011-07-26 00:59:27',
|
||||
'modified_by': 'Administrator',
|
||||
'owner': 'Administrator'
|
||||
},
|
||||
|
@ -3,9 +3,9 @@
|
||||
|
||||
# These values are common in all dictionaries
|
||||
{
|
||||
'creation': '2011-06-23 11:03:25',
|
||||
'creation': '2011-06-27 10:52:02',
|
||||
'docstatus': 0,
|
||||
'modified': '2011-07-01 17:46:42',
|
||||
'modified': '2011-07-26 00:59:27',
|
||||
'modified_by': 'Administrator',
|
||||
'owner': 'Administrator'
|
||||
},
|
||||
@ -70,7 +70,7 @@
|
||||
'fieldtype': 'Select',
|
||||
'idx': 1,
|
||||
'label': 'Select DocType',
|
||||
'options': 'link:DocType'
|
||||
'options': '\nAccount\nCompany\nCustomer\nSupplier\nEmployee\nWarehouse\nItem'
|
||||
},
|
||||
|
||||
# DocField
|
||||
|
Loading…
Reference in New Issue
Block a user