fixed conflict

This commit is contained in:
Brahma K
2011-07-27 10:54:11 +05:30
103 changed files with 841 additions and 2232 deletions

View File

@@ -79,7 +79,8 @@
'oldfieldname': 'company',
'oldfieldtype': 'Link',
'options': 'Company',
'reqd': 0
'reqd': 0,
'search_index': 0
},
# DocField
@@ -157,7 +158,8 @@
'label': 'Applicable To (Employee)',
'oldfieldname': 'to_emp',
'oldfieldtype': 'Link',
'options': 'Employee'
'options': 'Employee',
'search_index': 0
},
# DocField
@@ -171,7 +173,8 @@
'label': 'Applicable To (Designation)',
'oldfieldname': 'to_designation',
'oldfieldtype': 'Link',
'options': 'Designation'
'options': 'Designation',
'search_index': 0
},
# DocField

View File

@@ -5,7 +5,7 @@
{
'creation': '2010-08-08 17:08:55',
'docstatus': 0,
'modified': '2011-07-06 11:42:34',
'modified': '2011-07-01 17:43:29',
'modified_by': 'Administrator',
'owner': 'Administrator'
},

View File

@@ -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')

View File

@@ -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'
}
]

View File

@@ -66,7 +66,8 @@
'idx': 1,
'label': 'Doc Type',
'oldfieldname': 'doc_type',
'oldfieldtype': 'Data'
'oldfieldtype': 'Data',
'search_index': 1
},
# DocField

View File

@@ -160,7 +160,7 @@
'oldfieldtype': 'Data',
'permlevel': 0,
'reqd': 1,
'search_index': 1
'search_index': 0
},
# DocField
@@ -186,7 +186,7 @@
'options': 'Company',
'permlevel': 0,
'reqd': 1,
'search_index': 1
'search_index': 0
},
# DocField

View File

@@ -191,7 +191,7 @@
'oldfieldtype': 'Select',
'options': '\nChannel Partner\nDistributor\nDealer\nAgent\nRetailer\nImplementation Partner\nReseller',
'permlevel': 0,
'search_index': 1
'search_index': 0
},
# DocField

View File

@@ -156,7 +156,7 @@
'oldfieldtype': 'Data',
'permlevel': 0,
'reqd': 1,
'search_index': 1
'search_index': 0
},
# DocField
@@ -281,7 +281,7 @@
'oldfieldtype': 'Select',
'options': 'link:Country',
'permlevel': 0,
'search_index': 1,
'search_index': 0,
'trigger': 'Client'
},
@@ -297,7 +297,7 @@
'oldfieldtype': 'Select',
'options': 'link:State',
'permlevel': 0,
'search_index': 1
'search_index': 0
},
# DocField
@@ -324,7 +324,8 @@
'oldfieldname': 'territory',
'oldfieldtype': 'Link',
'options': 'Territory',
'permlevel': 0
'permlevel': 0,
'search_index': 0
},
# DocField
@@ -397,7 +398,8 @@
'oldfieldname': 'distribution_id',
'oldfieldtype': 'Link',
'options': 'Budget Distribution',
'permlevel': 0
'permlevel': 0,
'search_index': 0
},
# DocField

View File

@@ -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')

View File

@@ -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'
}
]

View File

@@ -155,7 +155,7 @@
'oldfieldtype': 'Data',
'permlevel': 0,
'reqd': 1,
'search_index': 1
'search_index': 0
},
# DocField

View File

@@ -160,7 +160,7 @@
'oldfieldtype': 'Link',
'options': 'Sales Person',
'permlevel': 0,
'search_index': 1
'search_index': 0
},
# DocField
@@ -267,7 +267,8 @@
'oldfieldname': 'distribution_id',
'oldfieldtype': 'Link',
'options': 'Budget Distribution',
'permlevel': 0
'permlevel': 0,
'search_index': 0
},
# DocField

View File

@@ -106,7 +106,7 @@
'oldfieldtype': 'Select',
'options': '\nActive\nInactive',
'reqd': 1,
'search_index': 1
'search_index': 0
},
# DocField

View File

@@ -183,6 +183,7 @@ SetupData = function(cnty){
['Country',1,'Country','','Country master'],
['State',1,'State','','State master'],
['Rename Tool',3,'Rename Tool','','Rename a record'],
['Bulk Rename Tool',3,'Bulk Rename Tool','','Rename multiple records at a time'],
['Activty Type',1,'Activity Type','','Types of activities that you can select in your Timesheet'],
['City',1,'City','','City master']]};