[FIX] outlook : If server is running with --no-database-list than outllook shoud...
authorjam-openerp <jam@tinyerp.com>
Thu, 27 Jan 2011 09:37:57 +0000 (15:07 +0530)
committerjam-openerp <jam@tinyerp.com>
Thu, 27 Jan 2011 09:37:57 +0000 (15:07 +0530)
bzr revid: jam@tinyerp.com-20110127093757-38e32v8fk1eigbal

addons/outlook/plugin/openerp-outlook-plugin/dialogs/dialog_map.py
addons/outlook/plugin/openerp-outlook-plugin/dialogs/opt_processors.py
addons/outlook/plugin/openerp-outlook-plugin/setup.iss
addons/outlook/plugin/openerp-outlook-plugin/tiny_xmlrpc.py

index 72d515c..305d127 100644 (file)
@@ -421,6 +421,7 @@ class DialogCommand(ButtonProcessor):
         return "Displays the %s dialog" % dd.caption\r
 \r
 def TestConnection(btnProcessor,*args):\r
+    dbname = None\r
     server = NewConn.getitem('_server')\r
     port = NewConn.getitem('_port')\r
     NewConn.GetDBList()\r
@@ -428,18 +429,20 @@ def TestConnection(btnProcessor,*args):
         btnProcessor.window.LoadAllControls()\r
         win32ui.MessageBox("No server running on host "+ server+" at port "+str(port), "OpenERP Connection", flag_excl)\r
         return\r
-    try:\r
-        dbname = win32gui.GetDlgItemText(btnProcessor.window.hwnd, 7000)\r
-        if not dbname:\r
-            win32ui.MessageBox("Authentication Error !\nBad Database Name !", "OpenERP Connection", flag_excl)\r
-            return\r
-    except Exception,e:\r
-        print "Exception %s: %s"%(type(e),str(e))\r
+\r
     dbname = win32gui.GetDlgItemText(btnProcessor.window.hwnd, btnProcessor.other_ids[0])\r
     if not dbname:\r
+        try:\r
+            dbname = win32gui.GetDlgItemText(btnProcessor.window.hwnd, 7000)\r
+            if not dbname:\r
+                win32ui.MessageBox("Authentication Error !\nBad Database Name !", "OpenERP Connection", flag_excl)\r
+                return\r
+        except Exception,e:\r
+            print "Exception %s: %s"%(type(e),str(e))\r
+    win32ui.MessageBox(str(dbname),"DBNAME")\r
+    if not dbname:\r
         win32ui.MessageBox("No database found on host "+ server+" at port "+str(port), "OpenERP Connection", flag_excl)\r
         return\r
-\r
     uname = win32gui.GetDlgItemText(btnProcessor.window.hwnd, btnProcessor.other_ids[1])\r
     pwd = win32gui.GetDlgItemText(btnProcessor.window.hwnd, btnProcessor.other_ids[2])\r
 \r
@@ -470,7 +473,7 @@ def TestConnection(btnProcessor,*args):
             flag = flag_stop\r
             NewConn.setitem('_login', 'False')\r
     except Exception,e:\r
-        msg = "Authentication Error !\n\n" + getMessage(e)\r
+        msg = "Authentication Error !\n Invalid Configuration Please check server parameters and database name."\r
         flag = flag_error\r
     win32ui.MessageBox(msg, "OpenERP Connection", flag)\r
     return\r
index 4c8224e..ac64724 100644 (file)
@@ -94,7 +94,7 @@ class DBComboProcessor(ComboProcessor):
                                         "EDIT",\r
                                         db,\r
                                         dwStyle,\r
-                                        67,80,180,20,\r
+                                        127,80,235,20,\r
                                         parent,\r
                                         7000,\r
                                         0,\r
index d19cc66..110ea30 100644 (file)
@@ -50,7 +50,7 @@ Name: "slovenian"; MessagesFile: "compiler:Languages\Slovenian.isl"
 Name: "spanish"; MessagesFile: "compiler:Languages\Spanish.isl"\r
 \r
 [Files]\r
-Source: "C:\openerp-outlook-plugin\*"; DestDir: "{app}"; Flags: ignoreversion recursesubdirs createallsubdirs\r
+Source: "C:\workspace\build\*"; DestDir: "{app}"; Flags: ignoreversion recursesubdirs createallsubdirs\r
 ; NOTE: Don't use "Flags: ignoreversion" on any shared system files\r
 \r
 [Messages]\r
index 0b4568f..761f994 100644 (file)
@@ -108,7 +108,10 @@ class XMLRpcConn(object):
         self._uname = user\r
         self._pwd = pwd\r
         conn = xmlrpclib.ServerProxy(str(self._uri) + '/xmlrpc/common')\r
-        uid = execute(conn,'login',dbname, ustr(user), ustr(pwd))\r
+        try:\r
+            uid = execute(conn,'login',dbname, ustr(user), ustr(pwd))\r
+        except:\r
+            return False\r
         return uid\r
 \r
     def GetAllObjects(self):\r
@@ -288,7 +291,6 @@ class XMLRpcConn(object):
                 headers[line[:split_here]] = line[split_here:]\r
             temp1 = headers.get('Message-ID')\r
             temp2 = headers.get('Message-Id')\r
-            referances = headers.get('References')\r
             if temp1 == None:    message_id = temp2\r
             if temp2 == None:    message_id = temp1\r
             startCut = message_id.find("<")\r