[BUG-FIX] lp:670265
bzr revid: jam@tinyerp.com-20101208133650-3q2zudm9ceh2fav0
This commit is contained in:
Binary file not shown.
@@ -54,11 +54,11 @@ class Change:
|
||||
def __init__(self, aVal= None, sURL=""):
|
||||
self.win=DBModalDialog(60, 50, 120, 90, "Connect to Open ERP Server")
|
||||
|
||||
self.win.addFixedText("lblVariable", 38, 12, 60, 15, "Server")
|
||||
self.win.addFixedText("lblVariable", 38, 12, 25, 15, "Server ")
|
||||
|
||||
self.win.addEdit("txtHost",-2,9,60,15,sURL[sURL.find("/")+2:sURL.rfind(":")])
|
||||
|
||||
self.win.addFixedText("lblReportName",45 , 31, 60, 15, "Port")
|
||||
self.win.addFixedText("lblReportName",45 , 31, 15, 15, "Port ")
|
||||
self.win.addEdit("txtPort",-2,28,60,15,sURL[sURL.rfind(":")+1:])
|
||||
|
||||
self.win.addFixedText("lblLoginName", 2, 51, 60, 15, "Protocol Connection")
|
||||
@@ -92,6 +92,8 @@ class Change:
|
||||
global url
|
||||
url = self.protocol[self.win.getListBoxSelectedItem("lstProtocol")]+self.win.getEditText("txtHost")+":"+self.win.getEditText("txtPort")
|
||||
self.sock=RPCSession(url)
|
||||
desktop=getDesktop()
|
||||
doc = desktop.getCurrentComponent()
|
||||
docinfo=doc.getDocumentInfo()
|
||||
docinfo.setUserFieldValue(0,url)
|
||||
res=self.sock.listdb()
|
||||
|
||||
+4
@@ -192,6 +192,10 @@ class ServerParameter( unohelper.Base, XJobExecutor ):
|
||||
Change(aVal,url)
|
||||
if aVal[1]== -1:
|
||||
self.win.getEditText("lstDatabase")
|
||||
self.win.removeListBoxItems("lstDatabase", 0, self.win.getListBoxItemCount("lstDatabase"))
|
||||
self.win.setEditText("txtHost",aVal[0])
|
||||
for i in range(len(aVal[1])):
|
||||
self.lstDatabase.addItem(aVal[1][i],i)
|
||||
elif aVal[1]==0:
|
||||
ErrorDialog(aVal[0],"")
|
||||
else:
|
||||
|
||||
Reference in New Issue
Block a user