[FIX] outlook : If server is running with --no-database-list than outllook shoud show the Blank text box for database input
bzr revid: jam@tinyerp.com-20110127093757-38e32v8fk1eigbal
This commit is contained in:
parent
3381127292
commit
0109ea2adb
|
@ -421,6 +421,7 @@ class DialogCommand(ButtonProcessor):
|
|||
return "Displays the %s dialog" % dd.caption
|
||||
|
||||
def TestConnection(btnProcessor,*args):
|
||||
dbname = None
|
||||
server = NewConn.getitem('_server')
|
||||
port = NewConn.getitem('_port')
|
||||
NewConn.GetDBList()
|
||||
|
@ -428,18 +429,20 @@ def TestConnection(btnProcessor,*args):
|
|||
btnProcessor.window.LoadAllControls()
|
||||
win32ui.MessageBox("No server running on host "+ server+" at port "+str(port), "OpenERP Connection", flag_excl)
|
||||
return
|
||||
try:
|
||||
dbname = win32gui.GetDlgItemText(btnProcessor.window.hwnd, 7000)
|
||||
if not dbname:
|
||||
win32ui.MessageBox("Authentication Error !\nBad Database Name !", "OpenERP Connection", flag_excl)
|
||||
return
|
||||
except Exception,e:
|
||||
print "Exception %s: %s"%(type(e),str(e))
|
||||
|
||||
dbname = win32gui.GetDlgItemText(btnProcessor.window.hwnd, btnProcessor.other_ids[0])
|
||||
if not dbname:
|
||||
try:
|
||||
dbname = win32gui.GetDlgItemText(btnProcessor.window.hwnd, 7000)
|
||||
if not dbname:
|
||||
win32ui.MessageBox("Authentication Error !\nBad Database Name !", "OpenERP Connection", flag_excl)
|
||||
return
|
||||
except Exception,e:
|
||||
print "Exception %s: %s"%(type(e),str(e))
|
||||
win32ui.MessageBox(str(dbname),"DBNAME")
|
||||
if not dbname:
|
||||
win32ui.MessageBox("No database found on host "+ server+" at port "+str(port), "OpenERP Connection", flag_excl)
|
||||
return
|
||||
|
||||
uname = win32gui.GetDlgItemText(btnProcessor.window.hwnd, btnProcessor.other_ids[1])
|
||||
pwd = win32gui.GetDlgItemText(btnProcessor.window.hwnd, btnProcessor.other_ids[2])
|
||||
|
||||
|
@ -470,7 +473,7 @@ def TestConnection(btnProcessor,*args):
|
|||
flag = flag_stop
|
||||
NewConn.setitem('_login', 'False')
|
||||
except Exception,e:
|
||||
msg = "Authentication Error !\n\n" + getMessage(e)
|
||||
msg = "Authentication Error !\n Invalid Configuration Please check server parameters and database name."
|
||||
flag = flag_error
|
||||
win32ui.MessageBox(msg, "OpenERP Connection", flag)
|
||||
return
|
||||
|
|
|
@ -94,7 +94,7 @@ class DBComboProcessor(ComboProcessor):
|
|||
"EDIT",
|
||||
db,
|
||||
dwStyle,
|
||||
67,80,180,20,
|
||||
127,80,235,20,
|
||||
parent,
|
||||
7000,
|
||||
0,
|
||||
|
|
|
@ -50,7 +50,7 @@ Name: "slovenian"; MessagesFile: "compiler:Languages\Slovenian.isl"
|
|||
Name: "spanish"; MessagesFile: "compiler:Languages\Spanish.isl"
|
||||
|
||||
[Files]
|
||||
Source: "C:\openerp-outlook-plugin\*"; DestDir: "{app}"; Flags: ignoreversion recursesubdirs createallsubdirs
|
||||
Source: "C:\workspace\build\*"; DestDir: "{app}"; Flags: ignoreversion recursesubdirs createallsubdirs
|
||||
; NOTE: Don't use "Flags: ignoreversion" on any shared system files
|
||||
|
||||
[Messages]
|
||||
|
|
|
@ -108,7 +108,10 @@ class XMLRpcConn(object):
|
|||
self._uname = user
|
||||
self._pwd = pwd
|
||||
conn = xmlrpclib.ServerProxy(str(self._uri) + '/xmlrpc/common')
|
||||
uid = execute(conn,'login',dbname, ustr(user), ustr(pwd))
|
||||
try:
|
||||
uid = execute(conn,'login',dbname, ustr(user), ustr(pwd))
|
||||
except:
|
||||
return False
|
||||
return uid
|
||||
|
||||
def GetAllObjects(self):
|
||||
|
@ -288,7 +291,6 @@ class XMLRpcConn(object):
|
|||
headers[line[:split_here]] = line[split_here:]
|
||||
temp1 = headers.get('Message-ID')
|
||||
temp2 = headers.get('Message-Id')
|
||||
referances = headers.get('References')
|
||||
if temp1 == None: message_id = temp2
|
||||
if temp2 == None: message_id = temp1
|
||||
startCut = message_id.find("<")
|
||||
|
|
Loading…
Reference in New Issue