diff --git a/addons/outlook/plugin/openerp-outlook-plugin/Register-plugin.bat b/addons/outlook/plugin/openerp-outlook-plugin/Register-plugin.bat index 6e024b39d35..aa3c0dac378 100644 --- a/addons/outlook/plugin/openerp-outlook-plugin/Register-plugin.bat +++ b/addons/outlook/plugin/openerp-outlook-plugin/Register-plugin.bat @@ -1,2 +1,2 @@ python addin.py -pause +pause \ No newline at end of file diff --git a/addons/outlook/plugin/openerp-outlook-plugin/Unregister-plugin.bat b/addons/outlook/plugin/openerp-outlook-plugin/Unregister-plugin.bat index 1fcc6a95563..0f821974661 100644 --- a/addons/outlook/plugin/openerp-outlook-plugin/Unregister-plugin.bat +++ b/addons/outlook/plugin/openerp-outlook-plugin/Unregister-plugin.bat @@ -1,2 +1,2 @@ -python addin.py --unregister -pause +python addin.py --unregister +pause \ No newline at end of file diff --git a/addons/outlook/plugin/openerp-outlook-plugin/addin.py b/addons/outlook/plugin/openerp-outlook-plugin/addin.py index f8f96dcb962..9cea4016bb2 100755 --- a/addons/outlook/plugin/openerp-outlook-plugin/addin.py +++ b/addons/outlook/plugin/openerp-outlook-plugin/addin.py @@ -61,14 +61,14 @@ def GetConn(): return d class ButtonEvent: - def OnClick(self, button, cancel): - import win32ui - try: - mngr = manager.GetManager() - mngr.ShowManager() - except Exception,e: - win32ui.MessageBox("Fail to Initialize dialog.\n"+str(e),"OpenERP Configuration", win32con.MB_ICONERROR) - return cancel + def OnClick(self, button, cancel): + import win32ui + try: + mngr = manager.GetManager() + mngr.ShowManager() + except Exception,e: + win32ui.MessageBox("Fail to Initialize dialog.\n"+str(e),"OpenERP Configuration", win32con.MB_ICONERROR) + return cancel # class ViewPartners: def OnClick(self, button, cancel): @@ -89,6 +89,47 @@ class ViewPartners: win32ui.MessageBox("Multiple selection not allowed. Please select only one mail at a time.","Open Contact",win32con.MB_ICONINFORMATION) return cancel # +class OpenPartner: + def OnClick(self, button, cancel): + import win32ui + from manager import ustr + mngr = manager.GetManager() + data=mngr.LoadConfig() + outlook = Dispatch("Outlook.Application") + ex = outlook.ActiveExplorer() + if ex: + is_login = str(data['login']) + if is_login == 'False': + win32ui.MessageBox("Please login to the database first", "OpenERP Connection", win32con.MB_ICONEXCLAMATION) + elif ex.Selection.Count == 1: + mngr = manager.GetManager() + mngr.ShowManager("IDD_OPEN_PARTNER_DIALOG") + elif ex.Selection.Count == 0: + win32ui.MessageBox("No mail selected to push to OpenERP","Push to OpenERP",win32con.MB_ICONINFORMATION) + elif ex.Selection.Count > 1: + win32ui.MessageBox("Multiple selection not allowed. Please select only one mail at a time.","Push to OpenERP",win32con.MB_ICONINFORMATION) + return cancel +# +class OpenDocument: + def OnClick(self, button, cancel): + from win32com.client import Dispatch + import win32con + import win32ui + mngr = manager.GetManager() + data=mngr.LoadConfig() + outlook = Dispatch("Outlook.Application") + ex = outlook.ActiveExplorer() + if ex: + is_login = str(data['login']) + if is_login == 'False': + win32ui.MessageBox("Please login to the database first", "OpenERP Connection", win32con.MB_ICONEXCLAMATION) + elif ex.Selection.Count == 1 or ex.Selection.Count == 0: + mngr = manager.GetManager() + mngr.ShowManager("IDD_OPEN_DOCUEMNT_DIALOG") + elif ex.Selection.Count > 1: + win32ui.MessageBox("Multiple selection not allowed. Please select only one mail at a time.","Open Document",win32con.MB_ICONINFORMATION) + return cancel +# class ArchiveEvent: def OnClick(self, button, cancel): from win32com.client import Dispatch @@ -151,7 +192,22 @@ class OutlookAddin: item.Enabled = True # Adding Menu in Menu Bar to the Web Menu of the Outlook + toolbaradvance = bars.Item("Advanced") toolbarweb = bars.Item("Web") + + item = toolbarweb.Controls.Add(Type = constants.msoControlButton, Temporary = True) + item = self.toolbarButtonOpenPartner = DispatchWithEvents(item, OpenPartner) + item.Caption = "Open Partners" + item.TooltipText = "Click to Open OpenERP Partner Contact Information." + item.Enabled = True + + +# item = toolbarweb.Controls.Add(Type = constants.msoControlButton, Temporary = True) +# item = self.toolbarButtonOpenDocument = DispatchWithEvents(item, OpenDocument) +# item.Caption = "Open Document" +# item.TooltipText = "Click to Open Document that ha been pushed to server." +# item.Enabled = True + # Hook events for the item item = toolbarweb.Controls.Add(Type = constants.msoControlButton, Temporary = True) item = self.toolbarButtonPartner = DispatchWithEvents(item, ViewPartners) @@ -159,6 +215,7 @@ class OutlookAddin: item.TooltipText = "Click to Open OpenERP Partner Contact Information." item.Enabled = True + item = tools_menu.Controls.Add(Type=constants.msoControlButton, Temporary=True) # Hook events for the item item = self.menu_bar_viewpartner_Button = DispatchWithEvents(item, ViewPartners) @@ -166,6 +223,14 @@ class OutlookAddin: item.TooltipText = "Click to Open Partner detail" item.Enabled = True + item = tools_menu.Controls.Add(Type=constants.msoControlButton, Temporary=True) + # Hook events for the item + item = self.menu_bar_openpartner_Button = DispatchWithEvents(item, OpenPartner) + item.Caption = "Open Partner" + item.TooltipText = "Click to Open Partner detail" + item.Enabled = True + + def OnDisconnection(self, mode, custom): mngr = manager.GetManager() mngr.config['login'] = False diff --git a/addons/outlook/plugin/openerp-outlook-plugin/chilkat.py b/addons/outlook/plugin/openerp-outlook-plugin/chilkat.py index 14e9741d09b..e9e68c6e2d0 100755 --- a/addons/outlook/plugin/openerp-outlook-plugin/chilkat.py +++ b/addons/outlook/plugin/openerp-outlook-plugin/chilkat.py @@ -635,6 +635,8 @@ class CkSocket(_object): def GetSslAcceptableClientCaDn(self, *args): return _chilkat.CkSocket_GetSslAcceptableClientCaDn(self, *args) def getSslAcceptableClientCaDn(self, *args): return _chilkat.CkSocket_getSslAcceptableClientCaDn(self, *args) def AddSslAcceptableClientCaDn(self, *args): return _chilkat.CkSocket_AddSslAcceptableClientCaDn(self, *args) + def get_ReceivedCount(self): return _chilkat.CkSocket_get_ReceivedCount(self) + def put_ReceivedCount(self, *args): return _chilkat.CkSocket_put_ReceivedCount(self, *args) def UnlockComponent(self, *args): return _chilkat.CkSocket_UnlockComponent(self, *args) def IsUnlocked(self): return _chilkat.CkSocket_IsUnlocked(self) def AsyncSendBytes(self, *args): return _chilkat.CkSocket_AsyncSendBytes(self, *args) @@ -2173,6 +2175,11 @@ class CkMailMan(_object): def put_Pop3Stls(self, *args): return _chilkat.CkMailMan_put_Pop3Stls(self, *args) def AddPfxSourceData(self, *args): return _chilkat.CkMailMan_AddPfxSourceData(self, *args) def AddPfxSourceFile(self, *args): return _chilkat.CkMailMan_AddPfxSourceFile(self, *args) + def SmtpSendRawCommand(self, *args): return _chilkat.CkMailMan_SmtpSendRawCommand(self, *args) + def smtpSendRawCommand(self, *args): return _chilkat.CkMailMan_smtpSendRawCommand(self, *args) + def Pop3SendRawCommand(self, *args): return _chilkat.CkMailMan_Pop3SendRawCommand(self, *args) + def pop3SendRawCommand(self, *args): return _chilkat.CkMailMan_pop3SendRawCommand(self, *args) + def Pop3EndSessionNoQuit(self): return _chilkat.CkMailMan_Pop3EndSessionNoQuit(self) def lastErrorText(self): return _chilkat.CkMailMan_lastErrorText(self) def lastErrorXml(self): return _chilkat.CkMailMan_lastErrorXml(self) def lastErrorHtml(self): return _chilkat.CkMailMan_lastErrorHtml(self) @@ -3155,7 +3162,7 @@ class CkHttp(_object): def put_UseBgThread(self, *args): return _chilkat.CkHttp_put_UseBgThread(self, *args) def BgResponseObject(self): return _chilkat.CkHttp_BgResponseObject(self) def BgTaskAbort(self): return _chilkat.CkHttp_BgTaskAbort(self) - def ClearEventLog(self): return _chilkat.CkHttp_ClearEventLog(self) + def ClearBgEventLog(self): return _chilkat.CkHttp_ClearBgEventLog(self) def EventLogName(self, *args): return _chilkat.CkHttp_EventLogName(self, *args) def eventLogName(self, *args): return _chilkat.CkHttp_eventLogName(self, *args) def EventLogValue(self, *args): return _chilkat.CkHttp_EventLogValue(self, *args) @@ -3759,6 +3766,8 @@ class CkSpider(_object): def put_ProxyPassword(self, *args): return _chilkat.CkSpider_put_ProxyPassword(self, *args) def get_ProxyPort(self): return _chilkat.CkSpider_get_ProxyPort(self) def put_ProxyPort(self, *args): return _chilkat.CkSpider_put_ProxyPort(self, *args) + def get_VerboseLogging(self): return _chilkat.CkSpider_get_VerboseLogging(self) + def put_VerboseLogging(self, *args): return _chilkat.CkSpider_put_VerboseLogging(self, *args) def put_UserAgent(self, *args): return _chilkat.CkSpider_put_UserAgent(self, *args) def userAgent(self): return _chilkat.CkSpider_userAgent(self) def get_UserAgent(self, *args): return _chilkat.CkSpider_get_UserAgent(self, *args) @@ -3781,6 +3790,7 @@ class CkSpider(_object): def CanonicalizeUrl(self, *args): return _chilkat.CkSpider_CanonicalizeUrl(self, *args) def getDomain(self, *args): return _chilkat.CkSpider_getDomain(self, *args) def getBaseDomain(self, *args): return _chilkat.CkSpider_getBaseDomain(self, *args) + def canonicalizeUrl(self, *args): return _chilkat.CkSpider_canonicalizeUrl(self, *args) def lastErrorText(self): return _chilkat.CkSpider_lastErrorText(self) def lastErrorXml(self): return _chilkat.CkSpider_lastErrorXml(self) diff --git a/addons/outlook/plugin/openerp-outlook-plugin/dialogs/dialog_map.py b/addons/outlook/plugin/openerp-outlook-plugin/dialogs/dialog_map.py index 26f0bed01ce..fe3db3e8d0d 100755 --- a/addons/outlook/plugin/openerp-outlook-plugin/dialogs/dialog_map.py +++ b/addons/outlook/plugin/openerp-outlook-plugin/dialogs/dialog_map.py @@ -31,7 +31,7 @@ import addin from dialogs import ShowDialog, MakePropertyPage import win32ui - +import webbrowser import commctrl import win32con import win32gui @@ -168,6 +168,19 @@ global name name='' global email email='' +global web_server +web_server = 'localhost' +global web_server_port +web_server_port = '8080' +global country_ref +country_ref = "" +global state_ref +state_ref = "" +global new_con_country +new_con_country= "" +global new_con_state +new_con_state= "" + def check(): server = NewConn.getitem('_server') @@ -251,7 +264,6 @@ class OKButtonProcessor(ButtonProcessor): try: port = int(win32gui.GetDlgItemText(self.window.hwnd, self.other_ids[1])) except ValueError, e: - print "Exception : %s"%str(e) win32ui.MessageBox("Port should be an integer", "OpenERP Connection", flag_excl) return except Exception,e: @@ -277,6 +289,27 @@ class DoneButtonProcessor(ButtonProcessor): self.window.manager.SaveConfig() win32gui.EndDialog(self.window.hwnd, id) +class WEBOKButtonProcessor(ButtonProcessor): + def __init__(self, window, control_ids): + self.mngr = window.manager + ControlProcessor.__init__(self, window, control_ids) + + def OnClicked(self, id): + global web_server + global web_server_port + server = win32gui.GetDlgItemText(self.window.hwnd, self.other_ids[0]) + try: + port = int(win32gui.GetDlgItemText(self.window.hwnd, self.other_ids[1])) + except ValueError, e: + win32ui.MessageBox("Port should be an integer", "OpenERP Connection", flag_excl) + return + if server.strip() == "" or server.strip() == "http:\\\\": + win32ui.MessageBox("Invalid web Server address.", "OpenERP Connection", flag_excl) + return + web_server = server + web_server_port = port + win32gui.EndDialog(self.window.hwnd, id) + class MessageProcessor(ControlProcessor): def Init(self): text = " This Outlook Plugin for OpenERP has been developed by OpenERP s.a.\n\n \ @@ -404,6 +437,7 @@ def TestConnection(btnProcessor,*args): 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]) @@ -646,17 +680,21 @@ def CreateCase(btnProcessor,*args): for rec in r: if rec[0] == 'res.partner': partner_ids.append(rec[1]) - + f = False #Create new case try: - NewConn.CreateCase(str(section), mail, partner_ids) + f = NewConn.CreateCase(str(section), mail, partner_ids) msg="New Document created." flag=flag_info except Exception,e: msg="New Document not created \n\n"+str(e) flag=flag_error - win32ui.MessageBox(msg, "Create Document", flag) - return + if f: + win32ui.MessageBox(msg, "Create Document", flag) + return + else: + win32ui.MessageBox("Error While creating document.\n Document can not be created.", "Create Document", flag_error) + return else: win32ui.MessageBox("Document can not be created. CRM not installed", "Create Object", flag_info) except Exception, e: @@ -784,6 +822,8 @@ def CreateContact(btnProcessor,*args): street2 = win32gui.GetDlgItemText(btnProcessor.window.hwnd, btnProcessor.other_ids[6]) city = win32gui.GetDlgItemText(btnProcessor.window.hwnd, btnProcessor.other_ids[7]) zip = win32gui.GetDlgItemText(btnProcessor.window.hwnd, btnProcessor.other_ids[8]) + state = win32gui.GetDlgItemText(btnProcessor.window.hwnd, btnProcessor.other_ids[10]) + country = win32gui.GetDlgItemText(btnProcessor.window.hwnd, btnProcessor.other_ids[11]) if not name: win32ui.MessageBox("Please enter name.", "Create Contact", flag_stop) return @@ -798,9 +838,10 @@ def CreateContact(btnProcessor,*args): 'street':ustr(street), 'street2':ustr(street2), 'city':ustr(city), - 'zip':ustr(zip) + 'zip':ustr(zip), + 'state_id':ustr(state), + 'country_id':ustr(country) } - try: id = NewConn.CreateContact(str(res)) if not partner: @@ -818,6 +859,10 @@ def CreateContact(btnProcessor,*args): def SetAllText(txtProcessor,*args): # Set values for url, uname, pwd from config file + global web_server + global web_server_port + serverBox = txtProcessor.GetControl(txtProcessor.other_ids[2]) + win32gui.SendMessage(serverBox, win32con.WM_SETTEXT, 0, "http:\\\\"+str(web_server)+":"+str(web_server_port)) url = NewConn.getitem('_uri') tbox = txtProcessor.GetControl() win32gui.SendMessage(tbox, win32con.WM_SETTEXT, 0, str(url)) @@ -893,10 +938,26 @@ def SetDefaultContact(txtProcessor,*args): global name global email global partner_ref - win32gui.SetDlgItemText(txtProcessor.window.hwnd, txtProcessor.other_ids[1],partner_ref) + global new_con_country + global new_con_state + state = win32gui.GetDlgItemText(txtProcessor.window.hwnd, txtProcessor.other_ids[2]) + country = win32gui.GetDlgItemText(txtProcessor.window.hwnd, txtProcessor.other_ids[3]) if txtProcessor.init_done: + if new_con_country == "": + new_con_country = country + if new_con_state == "": + new_con_state = state + win32gui.SetDlgItemText(txtProcessor.window.hwnd, txtProcessor.other_ids[1],partner_ref) win32gui.SetDlgItemText(txtProcessor.window.hwnd, txtProcessor.control_id,name) win32gui.SetDlgItemText(txtProcessor.window.hwnd, txtProcessor.other_ids[0],email) + win32gui.SetDlgItemText(txtProcessor.window.hwnd, txtProcessor.other_ids[2],new_con_state) + state_val = NewConn.FindCountryForState(str(state_ref)) + if state_val == None: + new_con_country = country + new_con_country = state_val + win32gui.SetDlgItemText(txtProcessor.window.hwnd, txtProcessor.other_ids[3],new_con_country) + new_con_country = "" + new_con_state = "" return # try: @@ -978,7 +1039,7 @@ def CreatePartner(btnProcessor,*args): b = check() if not b: return - + global partner_ref partner_name = win32gui.GetDlgItemText(btnProcessor.window.hwnd, btnProcessor.other_ids[0]) if not partner_name: win32ui.MessageBox("Please enter Partner name.", "Create Partner", flag_excl) @@ -992,6 +1053,7 @@ def CreatePartner(btnProcessor,*args): return if id: win32ui.MessageBox("New Partner '%s' created."%partner_name, "Create Partner", flag_info) + partner_ref = str(partner_name) win32gui.EndDialog(btnProcessor.window.hwnd, btnProcessor.id) else: win32ui.MessageBox("Partner '%s' already Exists."%partner_name, "Create Partner", flag_info) @@ -1010,13 +1072,37 @@ def set_name_email(dialogProcessor,*args): name = win32gui.GetDlgItemText(dialogProcessor.window.hwnd, dialogProcessor.other_ids[0]) email = win32gui.GetDlgItemText(dialogProcessor.window.hwnd, dialogProcessor.other_ids[1]) +#Function for Getting default mail when dialog is loaded and finding contact related to this +#setting values to the appropriate text areas def GetDefaultEmail(txtProcessor,*args): from win32com.client import Dispatch import win32con b = check() global partner_ref + global country_ref + global state_ref + partner_n = win32gui.GetDlgItemText(txtProcessor.window.hwnd, txtProcessor.other_ids[0]) + state_n = win32gui.GetDlgItemText(txtProcessor.window.hwnd, txtProcessor.other_ids[10]) + country_n = win32gui.GetDlgItemText(txtProcessor.window.hwnd, txtProcessor.other_ids[11]) + if partner_ref == "": + partner_ref = partner_n + if country_ref == "": + country_ref = country_n + if state_ref == "": + state_ref = state_n win32gui.SetDlgItemText(txtProcessor.window.hwnd, txtProcessor.other_ids[0], ustr(partner_ref)) + win32gui.SetDlgItemText(txtProcessor.window.hwnd, txtProcessor.other_ids[10], ustr(state_ref)) + state_val = NewConn.FindCountryForState(str(state_ref)) + partner_ref = "" + country_ref = "" + state_ref = "" + + if state_val == None: + country_ref = country_n + country_ref = state_val + win32gui.SetDlgItemText(txtProcessor.window.hwnd, txtProcessor.other_ids[11], ustr(country_ref)) + if not b: return #Acquiring control of the text box @@ -1167,6 +1253,8 @@ def WritePartner(btnProcessor,*args): street = win32gui.GetDlgItemText(btnProcessor.window.hwnd, btnProcessor.other_ids[2]) street2 = win32gui.GetDlgItemText(btnProcessor.window.hwnd, btnProcessor.other_ids[3]) city = win32gui.GetDlgItemText(btnProcessor.window.hwnd, btnProcessor.other_ids[4]) + state = win32gui.GetDlgItemText(btnProcessor.window.hwnd, btnProcessor.other_ids[5]) + country = win32gui.GetDlgItemText(btnProcessor.window.hwnd, btnProcessor.other_ids[6]) phone = win32gui.GetDlgItemText(btnProcessor.window.hwnd, btnProcessor.other_ids[7]) mobile = win32gui.GetDlgItemText(btnProcessor.window.hwnd, btnProcessor.other_ids[8]) fax = win32gui.GetDlgItemText(btnProcessor.window.hwnd, btnProcessor.other_ids[9]) @@ -1185,6 +1273,9 @@ def WritePartner(btnProcessor,*args): new_vals.append(['email',email]) new_vals.append(['fax',fax]) new_vals.append(['zip',zip]) + new_vals.append(['state',state]) + new_vals.append(['country',country]) + new_vals.append(['state',state]) flag = 0 try: #writing the updated values to the Server. @@ -1198,7 +1289,7 @@ def WritePartner(btnProcessor,*args): elif flag == 0: win32ui.MessageBox("Error in Updating the Changes.\n Please check the Database Connection.", "Open Contact", flag_error) elif flag == -1: - win32ui.MessageBox("Contact can not be Save.\nFirst select contact using Search.","Open Contact", flag_info) + win32ui.MessageBox("Contact can not be Save.\nFirst select partner using Search.","Open Contact", flag_info) def SetPartnerNameColumn(listProcessor,*args): hwndList = listProcessor.GetControl() @@ -1235,7 +1326,7 @@ def SelectPartnerFromList(btnProcessor,*args): sel_text = nombre[0:size] global partner_ref if str(sel_text).strip() == "": - win32ui.MessageBox("Invalid Partner Selected.","Search Partner") + win32ui.MessageBox("Invalid partner selected.","Search Partner") return try: partner_ref = str(sel_text) @@ -1244,10 +1335,10 @@ def SelectPartnerFromList(btnProcessor,*args): win32gui.EndDialog(btnProcessor.window.hwnd, btnProcessor.other_ids[1]) return elif sel_count < 1: - win32ui.MessageBox("You should Select atleast one partner.","Search Partner") + win32ui.MessageBox("You should select one partner.","Search Partner") return else: - win32ui.MessageBox("Multiple Selection is not allowded.","Search Partner") + win32ui.MessageBox("Multiple Selection is not allowed.","Search Partner") return def SearchPartnerList(btnProcessor,*args): @@ -1275,82 +1366,352 @@ def SearchPartnerList(btnProcessor,*args): win32ui.MessageBox(msg, "Search Partner", flag_error) pass +def ConnectWebServer(btnProcessor, *args): + b = check() + if not b: + return + server = win32gui.GetDlgItemText(btnProcessor.window.hwnd, btnProcessor.other_ids[0]) + webbrowser.open_new(str(server)+"\\openerp\\") + + +def OpenPartnerForm(txtProcessor,*args): + from win32com.client import Dispatch + import win32con + b = check() + if not b: + return + #Acquiring control of the text box + partner_link = txtProcessor.GetControl() + #Reading Current Selected Email. + ex = txtProcessor.window.manager.outlook.ActiveExplorer() + assert ex.Selection.Count == 1 + mail = ex.Selection.Item(1) + partner_text = "" + try: + partner_text = ustr(mail.SenderName).encode('iso-8859-1') + except Exception,e: + win32gui.SendMessage(partner_link, win32con.WM_SETTEXT, 0, "< Error in reading email.>") + pass + vals = NewConn.SearchPartner(partner_text) + if vals == None: + win32gui.SendMessage(partner_link, win32con.WM_SETTEXT, 0, "< No Partner with named "+str(partner_text)+" found.>") + txtProcessor.init_done=True + return + global web_server + global web_server_port + if web_server.strip() == "" or web_server.strip() == "http:\\\\": + win32gui.SendMessage(partner_link, win32con.WM_SETTEXT, 0, " ") + txtProcessor.init_done=True + return + try: + linktopartner = "http:\\\\"+web_server+":"+str(web_server_port)+"\\openerp\\form\\view?model=res.partner&id="+str(vals) + win32gui.SendMessage(partner_link, win32con.WM_SETTEXT, 0, linktopartner) + except Exception,e: + win32ui.MessageBox("Error While Opening Partner.\n"+str(e),"Open Partner", flag_error) + webbrowser.open_new(linktopartner) + txtProcessor.init_done=True + +def SerachOpenDocuemnt(txtProcessor,*args): + from win32com.client import Dispatch + import win32con + import win32ui + b = check() + if not b: + return + global web_server + global web_server_port + ex = txtProcessor.window.manager.outlook.ActiveExplorer() + assert ex.Selection.Count == 1 + mail = ex.Selection.Item(1) + link_box = None + #Acquiring control of the text box + try: + link_box = txtProcessor.GetControl() + except Exception,e: + win32ui.MessageBox(str(e),"Excet") + if web_server.strip() == "" or web_server.strip() == "http:\\\\": + win32gui.SendMessage(link_box, win32con.WM_SETTEXT, 0, " ") + txtProcessor.init_done=True + return + linktodoc = "" + #Reading Current Selected Email. + win32ui.MessageBox(str(mail),"mail") + try: + vals = NewConn.SearchEmailResources(mail) + except Exception,e: + win32ui.MessageBox(str(e),"Excep") + if vals == None: + win32gui.SendMessage(link_box, win32con.WM_SETTEXT, 0, "< Mail is still not archived.>") + txtProcessor.init_done=True + return + try: + linktodoc = web_server+":"+str(web_server_port)+"\\openerp\\form\\view?model="+vals[0][1]+"&id="+str(vals[1][1]) + win32gui.SendMessage(link_box, win32con.WM_SETTEXT, 0, linktodoc) + except Exception,e: + win32ui.MessageBox("Error While Opening Document.\n"+str(e),"Open Document", flag_error) + webbrowser.open_new(linktodoc) + txtProcessor.init_done=True + +def SearchCountry(btnProcessor, *args): + b = check() + if not b: + return + try : + search_country = win32gui.GetDlgItemText(btnProcessor.window.hwnd, btnProcessor.other_ids[0]) + if not search_country: + win32ui.MessageBox("Please enter country name to search for.", "Search Country", flag_excl) + return + #Searching the contact. + hwndList = win32gui.GetDlgItem(btnProcessor.window.hwnd, btnProcessor.other_ids[1]) + countries = list(NewConn.GetCountry(search_country)) + win32gui.SendMessage(hwndList, commctrl.LVM_DELETEALLITEMS) + if not countries: + win32gui.SetDlgItemText(btnProcessor.window.hwnd, btnProcessor.other_ids[0],"") + win32ui.MessageBox("No country found with name {0}.".format(search_country),"Search Country",flag_error) + for country in countries: + num_items = win32gui.SendMessage(hwndList, commctrl.LVM_GETITEMCOUNT) + item = LVITEM(text=country[1],iItem = num_items) + win32gui.SendMessage(hwndList, commctrl.LVM_INSERTITEM, 0, item.toparam()) + except Exception,e: + msg = getMessage(e) + win32ui.MessageBox(msg, "Search Country", flag_error) + pass + +def SetCountryList(listProcessor,*args): + + hwndList = listProcessor.GetControl() + child_ex_style = win32gui.SendMessage(hwndList, commctrl.LVM_GETEXTENDEDLISTVIEWSTYLE, 0, 0) + child_ex_style |= commctrl.LVS_EX_FULLROWSELECT + win32gui.SendMessage(hwndList, commctrl.LVM_SETEXTENDEDLISTVIEWSTYLE, 0, child_ex_style) + + # set header row + lvc = LVCOLUMN( + mask = commctrl.LVCF_FMT | commctrl.LVCF_WIDTH | \ + commctrl.LVCF_TEXT | commctrl.LVCF_SUBITEM + ) + lvc.fmt = commctrl.LVCFMT_LEFT + lvc.iSubItem = 1 + lvc.text = "Country Name" + lvc.cx = 275 + win32gui.SendMessage(hwndList, commctrl.LVM_INSERTCOLUMN, 0, lvc.toparam()) + listProcessor.init_done = True + +def SelectCountryFromList(btnProcessor,*args): + + hwndList = win32gui.GetDlgItem(btnProcessor.window.hwnd, btnProcessor.other_ids[0]) + sel_count = win32gui.SendMessage(hwndList, commctrl.LVM_GETSELECTEDCOUNT) + sel_text = '' + if sel_count == 1: + sel=-1 + for i in range(0,sel_count): + sel = win32gui.SendMessage(hwndList, commctrl.LVM_GETNEXTITEM, sel, commctrl.LVNI_SELECTED) + buf,extra = win32gui_struct.EmptyLVITEM(1, 0) + size = win32gui.SendMessage(hwndList, commctrl.LVM_GETITEMTEXT, sel, buf) + sel_text = '' + for n in extra: + nombre = n.tostring() + sel_text = nombre[0:size] + global country_ref + global new_con_country + if str(sel_text).strip() == "": + win32ui.MessageBox("Invalid country selected.","Search Country") + return + try: + country_ref = str(sel_text) + new_con_country = str(sel_text) + except Exception,e: + pass + win32gui.EndDialog(btnProcessor.window.hwnd, btnProcessor.other_ids[1]) + return + elif sel_count < 1: + win32ui.MessageBox("You must one country.","Search Country") + return + else: + win32ui.MessageBox("Multiple selection is not allowed.","Search Country") + return + +def SearchState(btnProcessor, *args): + b = check() + if not b: + return + try : + search_state = win32gui.GetDlgItemText(btnProcessor.window.hwnd, btnProcessor.other_ids[0]) + if not search_state: + win32ui.MessageBox("Please enter state name to search for.", "Search Fed.State", flag_excl) + return + #Searching the contact. + hwndList = win32gui.GetDlgItem(btnProcessor.window.hwnd, btnProcessor.other_ids[1]) + states = list(NewConn.GetStates(search_state)) + win32gui.SendMessage(hwndList, commctrl.LVM_DELETEALLITEMS) + if not states: + win32gui.SetDlgItemText(btnProcessor.window.hwnd, btnProcessor.other_ids[0],"") + win32ui.MessageBox("No state found with name {0}.".format(search_state),"Search Fed.State",flag_error) + for state in states: + num_items = win32gui.SendMessage(hwndList, commctrl.LVM_GETITEMCOUNT) + item = LVITEM(text=state[1],iItem = num_items) + win32gui.SendMessage(hwndList, commctrl.LVM_INSERTITEM, 0, item.toparam()) + except Exception,e: + msg = getMessage(e) + win32ui.MessageBox(msg, "Search Fed.State", flag_error) + pass + +def SetStateList(listProcessor,*args): + hwndList = listProcessor.GetControl() + child_ex_style = win32gui.SendMessage(hwndList, commctrl.LVM_GETEXTENDEDLISTVIEWSTYLE, 0, 0) + child_ex_style |= commctrl.LVS_EX_FULLROWSELECT + win32gui.SendMessage(hwndList, commctrl.LVM_SETEXTENDEDLISTVIEWSTYLE, 0, child_ex_style) + + # set header row + lvc = LVCOLUMN( + mask = commctrl.LVCF_FMT | commctrl.LVCF_WIDTH | \ + commctrl.LVCF_TEXT | commctrl.LVCF_SUBITEM + ) + lvc.fmt = commctrl.LVCFMT_LEFT + lvc.iSubItem = 1 + lvc.text = "Fed.State Name" + lvc.cx = 275 + win32gui.SendMessage(hwndList, commctrl.LVM_INSERTCOLUMN, 0, lvc.toparam()) + listProcessor.init_done = True + +def SelectStateFromList(btnProcessor,*args): + + hwndList = win32gui.GetDlgItem(btnProcessor.window.hwnd, btnProcessor.other_ids[0]) + sel_count = win32gui.SendMessage(hwndList, commctrl.LVM_GETSELECTEDCOUNT) + sel_text = '' + if sel_count == 1: + sel=-1 + for i in range(0,sel_count): + sel = win32gui.SendMessage(hwndList, commctrl.LVM_GETNEXTITEM, sel, commctrl.LVNI_SELECTED) + buf,extra = win32gui_struct.EmptyLVITEM(1, 0) + size = win32gui.SendMessage(hwndList, commctrl.LVM_GETITEMTEXT, sel, buf) + sel_text = '' + for n in extra: + nombre = n.tostring() + sel_text = nombre[0:size] + global state_ref + global new_con_state + if str(sel_text).strip() == "": + win32ui.MessageBox("Invalid fed. state selected.","Search Fed.State") + return + try: + state_ref = str(sel_text) + new_con_state = str(sel_text) + win32gui.EndDialog(btnProcessor.window.hwnd, btnProcessor.other_ids[1]) + except Exception,e: + pass + + return + elif sel_count < 1: + win32ui.MessageBox("You must select state.","Search Fed.State") + return + else: + win32ui.MessageBox("Multiple selection is not allowed.","Search Fed.State") + return + + dialog_map = { - "IDD_MANAGER" : ( - (CancelButtonProcessor, "IDCANCEL", resetConnAttribs, ()), - (TabProcessor, "IDC_TAB IDC_LIST", - """IDD_GENERAL IDD_OBJECT_SETTINGS IDD_ABOUT"""), - (DoneButtonProcessor, "ID_DONE"), - ), + "IDD_MANAGER" : ( + (CancelButtonProcessor, "IDCANCEL", resetConnAttribs, ()), + (TabProcessor, "IDC_TAB IDC_LIST", + """IDD_GENERAL IDD_OBJECT_SETTINGS IDD_ABOUT"""), + (DoneButtonProcessor, "ID_DONE"), + ), - "IDD_GENERAL": ( - (DBComboProcessor, "ID_DB_DROPDOWNLIST", GetConn, ()), - (TextProcessor, "ID_SERVER_PORT ID_USERNAME ID_PASSWORD", SetAllText, ()), - (CommandButtonProcessor, "ID_BUT_TESTCONNECTION ID_DB_DROPDOWNLIST ID_USERNAME \ - ID_PASSWORD", TestConnection, ()), - (CommandButtonProcessor, "IDC_RELOAD", ReloadAllControls, ()), - (DialogCommand, "IDC_BUT_SET_SERVER_PORT", "IDD_SERVER_PORT_DIALOG"), - ), + "IDD_GENERAL": ( + (DBComboProcessor, "ID_DB_DROPDOWNLIST", GetConn, ()), + (TextProcessor, "ID_SERVER_PORT ID_USERNAME ID_PASSWORD IDET_WED_SERVER", SetAllText, ()), + (CommandButtonProcessor, "ID_BUT_TESTCONNECTION ID_DB_DROPDOWNLIST ID_USERNAME \ + ID_PASSWORD", TestConnection, ()), + (CommandButtonProcessor, "IDC_RELOAD", ReloadAllControls, ()), + (DialogCommand, "IDC_BUT_SET_SERVER_PORT", "IDD_SERVER_PORT_DIALOG"), + (DialogCommand, "ID_SET_WEB_CONNECTION", "IDD_WEB_SERVER_PORT_DIALOG" ), + (CommandButtonProcessor, "IDPB_WEB_CONNECTION IDET_WED_SERVER", ConnectWebServer, ()), + ), - "IDD_OBJECT_SETTINGS" : ( - (CommandButtonProcessor, "IDC_BUT_LOAD_IMAGE IDC_IMAGE_PATH", GetImagePath, ()), - (CommandButtonProcessor, "IDC_BUT_SAVE_OBJECT IDC_OBJECT_TITLE IDC_OBJECT_NAME \ - IDC_IMAGE_PATH IDC_LIST", AddNewObject, ()), - (CommandButtonProcessor, "IDC_BUT_DEL_OBJECT IDC_LIST", DeleteSelectedObjects, ()), - (ListBoxProcessor, "IDC_LIST", SetDefaultList, ()) - ), + "IDD_OBJECT_SETTINGS" : ( + (CommandButtonProcessor, "IDC_BUT_LOAD_IMAGE IDC_IMAGE_PATH", GetImagePath, ()), + (CommandButtonProcessor, "IDC_BUT_SAVE_OBJECT IDC_OBJECT_TITLE IDC_OBJECT_NAME \ + IDC_IMAGE_PATH IDC_LIST", AddNewObject, ()), + (CommandButtonProcessor, "IDC_BUT_DEL_OBJECT IDC_LIST", DeleteSelectedObjects, ()), + (ListBoxProcessor, "IDC_LIST", SetDefaultList, ()) + ), - "IDD_ABOUT" : ( - (ImageProcessor, "IDB_OPENERPLOGO"), - (MessageProcessor, "IDC_ABOUT"), - ), + "IDD_ABOUT" : ( + (ImageProcessor, "IDB_OPENERPLOGO"), + (MessageProcessor, "IDC_ABOUT"), + ), - "IDD_SERVER_PORT_DIALOG" : ( - (CloseButtonProcessor, "IDCANCEL"), - (OKButtonProcessor, "IDOK ID_SERVER ID_PORT IDR_XML_PROTOCOL"), - (RadioButtonProcessor, "IDR_XML_PROTOCOL", GetConn, ()), - (RadioButtonProcessor, "IDR_XMLS_PROTOCOL", GetConn, ()), - (RadioButtonProcessor, "IDR_NETRPC_PROTOCOL", GetConn, ()), - ), + "IDD_SERVER_PORT_DIALOG" : ( + (CloseButtonProcessor, "IDCANCEL"), + (OKButtonProcessor, "IDOK ID_SERVER ID_PORT IDR_XML_PROTOCOL"), + ), - "IDD_SYNC" : ( - (CommandButtonProcessor, "ID_SEARCH ID_SEARCH_TEXT IDC_NAME_LIST", SearchObjectsForText,()), - (GroupProcessor, "IDC_STATIC_GROUP", setCheckList, ()), - (CSComboProcessor, "ID_ATT_METHOD_DROPDOWNLIST", GetConn,()), - (TextProcessor, "ID_SEARCH_TEXT", GetSearchText, ()), - (DialogCommand, "ID_CREATE_CONTACT ID_SEARCH_TEXT", "IDD_NEW_CONTACT_DIALOG", set_search_text, ()), - (CloseButtonProcessor, "IDCANCEL"), - (CommandButtonProcessor, "ID_MAKE_ATTACHMENT IDC_NAME_LIST IDD_SYNC", MakeAttachment, ()), - (CommandButtonProcessor, "ID_CREATE_CASE ID_ATT_METHOD_DROPDOWNLIST IDC_NAME_LIST", CreateCase, ()), - (ListBoxProcessor, "IDC_NAME_LIST", SetNameColumn, ()) - ), + "IDD_SYNC" : ( + (CommandButtonProcessor, "ID_SEARCH ID_SEARCH_TEXT IDC_NAME_LIST", SearchObjectsForText,()), + (GroupProcessor, "IDC_STATIC_GROUP", setCheckList, ()), + (CSComboProcessor, "ID_ATT_METHOD_DROPDOWNLIST", GetConn,()), + (TextProcessor, "ID_SEARCH_TEXT", GetSearchText, ()), + (DialogCommand, "ID_CREATE_CONTACT ID_SEARCH_TEXT", "IDD_NEW_CONTACT_DIALOG", set_search_text, ()), + (CloseButtonProcessor, "IDCANCEL"), + (CommandButtonProcessor, "ID_MAKE_ATTACHMENT IDC_NAME_LIST IDD_SYNC", MakeAttachment, ()), + (CommandButtonProcessor, "ID_CREATE_CASE ID_ATT_METHOD_DROPDOWNLIST IDC_NAME_LIST", CreateCase, ()), + (ListBoxProcessor, "IDC_NAME_LIST", SetNameColumn, ()) + ), - "IDD_NEW_CONTACT_DIALOG" : ( - (CloseButtonProcessor, "IDCANCEL"), - (CommandButtonProcessor, "ID_CONTACT_SAVE_BUTTON ID_CONTACT_NAME_TEXT ID_CONTACT_EMAIL_TEXT ID_CONTACT_OFFICE_TEXT ID_CONTACT_MOBILE_TEXT ID_FAX_TEXT ID_STREET_TEXT ID_STREET2_TEXT ID_PARTNER_CITY_TEXT ID_ZIP_TEXT ID_PARTNER_TEXT", CreateContact, ()), - (TextProcessor, "ID_CONTACT_NAME_TEXT ID_CONTACT_EMAIL_TEXT ID_PARTNER_TEXT" , SetDefaultContact, ()), - (DialogCommand, "ID_NEW_PARTNER_BUTTON", "IDD_SELECT_PARTNER"), - ), + "IDD_NEW_CONTACT_DIALOG" : ( + (CloseButtonProcessor, "IDCANCEL"), + (CommandButtonProcessor, "ID_CONTACT_SAVE_BUTTON ID_CONTACT_NAME_TEXT ID_CONTACT_EMAIL_TEXT ID_CONTACT_OFFICE_TEXT ID_CONTACT_MOBILE_TEXT ID_FAX_TEXT ID_STREET_TEXT ID_STREET2_TEXT ID_PARTNER_CITY_TEXT ID_ZIP_TEXT ID_PARTNER_TEXT IDET_NC_PARTNER_STATE IDET_NC_PARTNER_COUNTRY", CreateContact, ()), + (TextProcessor, "ID_CONTACT_NAME_TEXT ID_CONTACT_EMAIL_TEXT ID_PARTNER_TEXT IDET_NC_PARTNER_STATE IDET_NC_PARTNER_COUNTRY" , SetDefaultContact, ()), + (DialogCommand, "ID_NEW_PARTNER_BUTTON", "IDD_SELECT_PARTNER"), + (DialogCommand, "IDPB_NEW_PARTNER_BUTTON", "IDD_NEW_PARTNER_DIALOG"), + (DialogCommand, "IDPB_NC_SEARCH_STATE1", "IDD_SELECT_STATE"), + (DialogCommand, "IDPB_NC_SEARCH_COUNTRY1", "IDD_SELECT_COUNTRY"), + ), - "IDD_NEW_PARTNER_DIALOG" : ( - (CloseButtonProcessor, "IDCANCEL"), - (CommandButtonProcessor, "ID_SAVE_PARTNER_BUTTON ID_PARTNER_NAME_TEXT", CreatePartner, ()), - ), + "IDD_NEW_PARTNER_DIALOG" : ( + (CloseButtonProcessor, "IDCANCEL"), + (CommandButtonProcessor, "ID_SAVE_PARTNER_BUTTON ID_PARTNER_NAME_TEXT", CreatePartner, ()), + ), - "IDD_VIEW_PARTNER_DIALOG" : ( - (TextProcessor, "IDET_SEARCH_PARTNER IDET_PARTNER IDET_PARTNER_CONTACT_NAME IDET_PARTNER_STREET IDET_PARTNER_STREET2 IDET_PARTNER_CITY IDET_PARTNER_OFFICENO IDET_PARTNER_MOBILENO IDET_PARTNER_EMAIL IDET_PARTNER_FAX IDET_ZIP IDET_PARTNER_STATE IDET_PARTNER_COUNTRY", GetDefaultEmail, ()), - (CommandButtonProcessor, "IDPB_SEARCH_PARTNER IDET_SEARCH_PARTNER IDET_PARTNER IDET_PARTNER_CONTACT_NAME IDET_PARTNER_STREET IDET_PARTNER_STREET2 IDET_PARTNER_CITY IDET_PARTNER_OFFICENO IDET_PARTNER_MOBILENO IDET_PARTNER_EMAIL IDET_PARTNER_FAX IDET_ZIP IDET_PARTNER_STATE IDET_PARTNER_COUNTRY", SearchPartner, ()), - (CommandButtonProcessor, "IDPB_WRITE_CHANGES IDET_PARTNER IDET_PARTNER_CONTACT_NAME IDET_PARTNER_STREET IDET_PARTNER_STREET2 IDET_PARTNER_CITY IDET_PARTNER_STATE IDET_PARTNER_COUNTRY IDET_PARTNER_OFFICENO IDET_PARTNER_MOBILENO IDET_PARTNER_EMAIL IDET_PARTNER_FAX IDET_ZIP", WritePartner, ()), - (CloseButtonProcessor, "IDCANCEL"), - (DialogCommand, "ID_NEW_PART_BUTTON", "IDD_SELECT_PARTNER" ), - (DialogCommand, "IDPB_NEWPARTNER_BUTTON" , "IDD_NEW_CONTACT_DIALOG") - ), - "IDD_SELECT_PARTNER" : ( - (CloseButtonProcessor, "IDCANCEL"), - (ListBoxProcessor, "IDC_LIST_PARTNER" ,SetPartnerNameColumn, ()), - (CommandButtonProcessor, "IDPB_PARTNER_SEARCH IDET_PARTNER_SEARCH_NAME IDC_LIST_PARTNER", SearchPartnerList,()), - (CommandButtonProcessor, "IDPB_SELECT_PARTNER IDC_LIST_PARTNER IDD_SELECT_PARTNER" , SelectPartnerFromList,()), - (DialogCommand, "IDPB_CREATE_NEW_PARTNER" , "IDD_NEW_PARTNER_DIALOG") - ), + "IDD_VIEW_PARTNER_DIALOG" : ( + (TextProcessor, "IDET_SEARCH_PARTNER IDET_PARTNER IDET_PARTNER_CONTACT_NAME IDET_PARTNER_STREET IDET_PARTNER_STREET2 IDET_PARTNER_CITY IDET_PARTNER_OFFICENO IDET_PARTNER_MOBILENO IDET_PARTNER_EMAIL IDET_PARTNER_FAX IDET_ZIP IDET_PARTNER_STATE IDET_PARTNER_COUNTRY", GetDefaultEmail, ()), + (CommandButtonProcessor, "IDPB_SEARCH_PARTNER IDET_SEARCH_PARTNER IDET_PARTNER IDET_PARTNER_CONTACT_NAME IDET_PARTNER_STREET IDET_PARTNER_STREET2 IDET_PARTNER_CITY IDET_PARTNER_OFFICENO IDET_PARTNER_MOBILENO IDET_PARTNER_EMAIL IDET_PARTNER_FAX IDET_ZIP IDET_PARTNER_STATE IDET_PARTNER_COUNTRY", SearchPartner, ()), + (CommandButtonProcessor, "IDPB_WRITE_CHANGES IDET_PARTNER IDET_PARTNER_CONTACT_NAME IDET_PARTNER_STREET IDET_PARTNER_STREET2 IDET_PARTNER_CITY IDET_PARTNER_STATE IDET_PARTNER_COUNTRY IDET_PARTNER_OFFICENO IDET_PARTNER_MOBILENO IDET_PARTNER_EMAIL IDET_PARTNER_FAX IDET_ZIP", WritePartner, ()), + (CloseButtonProcessor, "IDCANCEL"), + (DialogCommand, "ID_NEW_PART_BUTTON", "IDD_SELECT_PARTNER" ), + (DialogCommand, "IDPB_NEWPARTNER_BUTTON" , "IDD_NEW_CONTACT_DIALOG"), + (DialogCommand, "IDPB_NEW_PART_BUTTON", "IDD_NEW_PARTNER_DIALOG"), + (DialogCommand, "IDPB_SEARCH_COUNTRY1", "IDD_SELECT_COUNTRY"), + (DialogCommand, "IDPB_SEARCH_STATE1", "IDD_SELECT_STATE"), + + ), + "IDD_SELECT_PARTNER" : ( + (ListBoxProcessor, "IDC_LIST_PARTNER" ,SetPartnerNameColumn, ()), + (CommandButtonProcessor, "IDPB_PARTNER_SEARCH IDET_PARTNER_SEARCH_NAME IDC_LIST_PARTNER", SearchPartnerList,()), + (CommandButtonProcessor, "IDPB_SELECT_PARTNER IDC_LIST_PARTNER IDD_SELECT_PARTNER" , SelectPartnerFromList,()), + (DialogCommand, "IDPB_CREATE_NEW_PARTNER" , "IDD_NEW_PARTNER_DIALOG") + ), + "IDD_OPEN_PARTNER_DIALOG" : ( + (CloseButtonProcessor, "IDCANCEL"), + (TextProcessor, "IDET_PARTNER_LINK_TEXT", OpenPartnerForm, ()), + ), + "IDD_OPEN_DOCUEMNT_DIALOG" : ( + (CloseButtonProcessor, "IDCANCEL"), + (TextProcessor, "IDEB_OPENDOC_LINK_TEXT", SerachOpenDocuemnt,()), + ), + "IDD_WEB_SERVER_PORT_DIALOG" :( + (CloseButtonProcessor, "IDCANCEL"), + (WEBOKButtonProcessor, "ID_WEB_OK IDET_WEB_SERVER IDET_WEB_PORT") + ), + "IDD_SELECT_COUNTRY" : ( + (CommandButtonProcessor, "IDPB_SEARCH_COUNTRY IDET_COUNTRY_SEARCH_NAME IDC_LIST_COUNTRY" , SearchCountry, ()), + (ListBoxProcessor, "IDC_LIST_COUNTRY" ,SetCountryList, ()), + (CommandButtonProcessor, "IDPB_SELECT_COUNTRY IDC_LIST_COUNTRY IDD_SELECT_COUNTRY" , SelectCountryFromList,()), + ), + "IDD_SELECT_STATE" : ( + (CommandButtonProcessor, "IDPB_STATE_SEARCH IDET_STATE_SEARCH_NAME IDC_LIST_STATE" , SearchState, ()), + (ListBoxProcessor, "IDC_LIST_STATE" ,SetStateList, ()), + (CommandButtonProcessor, "IDPB_SELECT_STATE IDC_LIST_STATE IDD_SELECT_STATE" , SelectStateFromList,()), + ), } diff --git a/addons/outlook/plugin/openerp-outlook-plugin/dialogs/resources/dialogs.h b/addons/outlook/plugin/openerp-outlook-plugin/dialogs/resources/dialogs.h index bb028c0da90..a816b9838ab 100755 --- a/addons/outlook/plugin/openerp-outlook-plugin/dialogs/resources/dialogs.h +++ b/addons/outlook/plugin/openerp-outlook-plugin/dialogs/resources/dialogs.h @@ -177,6 +177,37 @@ #define IDPB_PARTNER_SEARCH 2077 #define IDPB_CREATE_NEW_PARTNER 2078 #define ID_PARTNER_TEXT 2079 +#define IDET_WED_SERVER 2080 +#define IDET_WEB_PORT 2081 +#define ID_SET_WEB_CONNECTION 2082 +#define IDPB_WEB_CONNECTION 2083 +#define IDD_OPEN_PARTNER_DIALOG 2084 +#define IDET_PARTNER_LINK_TEXT 2085 +#define IDEB_OPENDOC_LINK_TEXT 2086 +#define IDD_OPEN_DOCUEMNT_DIALOG 2087 +#define IDD_WEB_SERVER_PORT_DIALOG 2088 +#define IDET_WEB_SERVER 2089 +#define IDET_WEB_PORT 2090 +#define ID_WEB_OK 2091 +#define IDPB_NEW_PARTNER_BUTTON 2092 +#define IDPB_NEW_PART_BUTTON 2093 +#define IDD_SELECT_COUNTRY 2094 +#define IDET_COUNTRY_SEARCH_NAME 2095 +#define IDC_LIST_COUNTRY 2096 +#define IDPB_SELECT_COUNTRY 2097 +#define IDPB_SEARCH_COUNTRY 2098 +#define IDD_SELECT_STATE 2099 +#define IDET_STATE_SEARCH_NAME 2100 +#define IDC_LIST_STATE 2101 +#define IDPB_SELECT_STATE 2102 +#define IDPB_SEARCH_STATE 2103 +#define IDPB_SEARCH_STATE1 2104 +#define IDPB_SEARCH_COUNTRY1 2105 + +#define IDET_NC_PARTNER_STATE 2106 +#define IDPB_NC_SEARCH_STATE1 2107 +#define IDET_NC_PARTNER_COUNTRY 2108 +#define IDPB_NC_SEARCH_COUNTRY1 2109 // Next default values for new objects // #ifdef APSTUDIO_INVOKED diff --git a/addons/outlook/plugin/openerp-outlook-plugin/dialogs/resources/dialogs.py b/addons/outlook/plugin/openerp-outlook-plugin/dialogs/resources/dialogs.py index 3dac98b5fb0..4c4aabab683 100755 --- a/addons/outlook/plugin/openerp-outlook-plugin/dialogs/resources/dialogs.py +++ b/addons/outlook/plugin/openerp-outlook-plugin/dialogs/resources/dialogs.py @@ -1,11 +1,11 @@ -#C:\Documents and Settings\TinyERP\Desktop\OpenERP-Outlook-PlugIn\openerp-outlook-plugin\dialogs\resources\dialogs.py -#This is a generated file. Please edit C:\Documents and Settings\TinyERP\Desktop\OpenERP-Outlook-PlugIn\openerp-outlook-plugin\dialogs\resources\dialogs.rc instead. -_rc_size_=11883 -_rc_mtime_=1285738756 +#C:\workspace\openerp-outlook-plugin\dialogs\resources\dialogs.py +#This is a generated file. Please edit C:\workspace\openerp-outlook-plugin\dialogs\resources\dialogs.rc instead. +_rc_size_=16024 +_rc_mtime_=1286276397 class FakeParser: - dialogs = {'IDD_VIEW_PARTNER_DIALOG': [['Open Contact', (0, 0, 350, 215), -1865940928, 1024, (8, 'Tahoma')], [130, 'Email ID : ', -1, (32, 17, 40, 12), 1342177280], [129, '', 2051, (70, 15, 200, 12), 1350631552], [128, 'Search Contact ', 2052, (280, 15, 60, 14), 1342242816], [130, 'Partner Name : ', -1, (13, 42, 50, 17), 1342177280], [129, '', 2064, (70, 42, 200, 12), 1350568064], [128, 'Search Partner', 2070, (280, 41, 60, 14), 1342242816], [128, 'Postal Address ', 2024, (10, 65, 175, 125), 1342177287], [130, 'Contact Name : ', -1, (18, 83, 50, 17), 1342177280], [129, '', 2046, (76, 82, 100, 12), 1350631552], [130, 'Street : ', -1, (18, 97, 50, 17), 1342177280], [129, '', 2053, (76, 96, 100, 12), 1350631552], [130, 'Street2 : ', -1, (18, 112, 50, 17), 1342177280], [129, '', 2054, (76, 111, 100, 12), 1350631552], [130, 'Zip : ', -1, (18, 126, 50, 14), 1342177280], [129, '', 40010, (76, 125, 100, 12), 1350631552], [130, 'City : ', -1, (18, 140, 50, 17), 1342177280], [129, '', 40011, (76, 139, 100, 12), 1350631552], [130, 'Fed. State : ', -1, (18, 154, 50, 17), 1342177280], [129, '', 2062, (76, 153, 100, 12), 1350568064], [130, 'Country :', -1, (18, 169, 35, 17), 1342177280], [129, '', 2063, (76, 168, 100, 12), 1350568064], [128, 'Communication ', 2024, (188, 65, 152, 125), 1342177287], [130, 'Phone : ', -1, (194, 83, 30, 17), 1342177280], [129, '', 2048, (224, 82, 100, 12), 1350631552], [130, 'Mobile : ', -1, (194, 97, 30, 17), 1342177280], [129, '', 2050, (224, 96, 100, 12), 1350631552], [130, 'Email : ', -1, (194, 111, 30, 17), 1342177280], [129, '', 2058, (224, 110, 100, 12), 1350568064], [130, 'Fax : ', -1, (194, 125, 30, 17), 1342177280], [129, '', 2047, (224, 124, 100, 12), 1350631552], [128, 'Create a New Contact', 2071, (124, 195, 82, 14), 1342242816], [128, 'Save', 2059, (213, 195, 60, 14), 1342242816], [128, 'Cancel', 2, (281, 195, 60, 14), 1342242816]], 'IDD_GENERAL': [['Connection Parameters', (0, 0, 430, 210), 1355284544, None, (8, 'Tahoma')], [128, '', 2024, (10, 10, 250, 130), 1342177287], [130, 'Server : ', -1, (30, 30, 100, 17), 1342177280], [129, '', 2003, (85, 30, 120, 12), 1350633472], [128, 'Change', 2021, (210, 30, 30, 13), 1342242816], [130, 'Database : ', -1, (30, 50, 100, 17), 1342177280], [133, '', 2004, (85, 50, 120, 40), 1344339971], [128, 'Reload', 2038, (210, 50, 30, 13), 1342242816], [130, 'Username : ', -1, (30, 70, 100, 17), 1342177280], [129, '', 2005, (85, 70, 154, 12), 1350631552], [130, 'Password : ', -1, (30, 90, 100, 17), 1342177280], [129, '', 2006, (85, 90, 154, 12), 1350631584], [128, 'Connect', 2007, (179, 110, 60, 13), 1342242816]], 'IDD_OBJECT_SETTINGS': [['Documents Setting', (0, 0, 430, 210), 1355284672, 1024, (8, 'Tahoma')], [128, 'Document Attributes', 2024, (2, 2, 340, 32), 1342177287], [130, 'Title', -1, (6, 15, 30, 17), 1342177280], [129, '', 2013, (20, 14, 57, 12), 1350631552], [130, 'Document Name', -1, (83, 15, 60, 17), 1342177280], [129, '', 2014, (138, 14, 57, 12), 1350631552], [130, 'Image', -1, (200, 15, 20, 17), 1342177280], [129, '', 2015, (220, 14, 57, 12), 1350631552], [128, 'Load Image', 2010, (286, 13, 50, 15), 1342242816], [128, 'Add', 2011, (347, 13, 38, 15), 1342242816], [128, 'Remove', 2012, (391, 13, 38, 15), 1342242816], ['SysListView32', 'List1', 2016, (8, 40, 535, 160), 1353711657]], 'IDD_NEW_PARTNER_DIALOG': [['Create a New Partner', (0, 0, 140, 40), -1865940928, 1024, (8, 'Tahoma')], [130, 'Name : ', -1, (5, 3, 100, 17), 1342177280], [129, '', 2036, (40, 3, 94, 12), 1350631552], [128, 'Cancel', 2, (90, 22, 45, 14), 1342242816], [128, 'Save', 2035, (40, 22, 45, 14), 1342242817]], 'IDD_MANAGER': [['OpenERP Configuarion', (0, 0, 460, 260), -1865940800, None, (8, 'Tahoma')], [128, 'Close', 2008, (400, 239, 50, 14), 1342177281], ['SysTabControl32', '', 1068, (8, 7, 440, 228), 1342177280], ['SysListView32', '', 2016, (0, 0, 0, 0), 1353711657]], 'IDD_ABOUT': [['About', (0, 0, 430, 210), 1355284672, 1024, (8, 'Tahoma')], [128, 'About Plugin', -1, (7, 3, 422, 200), 1342177287], [130, '1062', 1062, (60, 30, 20, 20), 1342179342], [130, '', 2028, (80, 90, 300, 100), 1342177280]], 'IDD_NEW_CONTACT_DIALOG': [['Create a New Contact', (0, 0, 350, 150), -1865940928, 1024, (8, 'Tahoma')], [130, 'Select Partner : ', -1, (13, 20, 50, 17), 1342177280], [129, '', 2079, (70, 18, 200, 12), 1350568064], [128, 'Search Partner', 2033, (280, 17, 60, 14), 1342242816], [128, 'Postal Address ', 2024, (10, 35, 175, 90), 1342177287], [130, 'Contact Name : ', -1, (18, 53, 100, 17), 1342177280], [129, '', 40005, (76, 52, 100, 12), 1350631552], [130, 'Street : ', -1, (18, 67, 40, 17), 1342177280], [129, '', 2062, (76, 66, 100, 12), 1350631552], [130, 'Street2 : ', -1, (18, 81, 40, 17), 1342177280], [129, '', 2063, (76, 80, 100, 12), 1350631552], [130, 'Zip : ', -1, (18, 94, 50, 17), 1342177280], [129, '', 2068, (76, 93, 100, 12), 1350631552], [130, 'City : ', -1, (18, 106, 50, 17), 1342177280], [129, '', 2067, (76, 107, 100, 12), 1350631552], [128, 'Communication ', 2024, (188, 35, 150, 90), 1342177287], [130, 'Office : ', -1, (194, 53, 30, 17), 1342177280], [129, '', 40006, (224, 52, 100, 12), 1350631552], [130, 'Mobile : ', -1, (194, 67, 30, 17), 1342177280], [129, '', 40007, (224, 66, 100, 12), 1350631552], [130, 'Fax : ', -1, (194, 81, 30, 17), 1342177280], [129, '', 2066, (224, 80, 100, 12), 1350631552], [130, 'Email : ', -1, (194, 95, 30, 17), 1342177280], [129, '', 40008, (224, 94, 100, 12), 1350631552], [128, 'Cancel', 2, (290, 130, 45, 14), 1342242816], [128, 'Save', 40009, (240, 130, 45, 14), 1342242816]], 'IDD_SERVER_PORT_DIALOG': [['OpenERP Connection', (0, 0, 160, 55), -1865940928, 1024, (8, 'Tahoma')], [130, 'Server : ', -1, (5, 3, 150, 17), 1342177280], [129, '', 2001, (40, 3, 100, 12), 1350631552], [130, 'Port : ', -1, (5, 18, 100, 17), 1342177280], [129, '', 2002, (40, 18, 100, 12), 1350631552], [128, 'Close', 2, (110, 35, 45, 14), 1342242816], [128, 'OK', 1, (60, 35, 45, 14), 1342242817]], 'IDD_SELECT_PARTNER': [['Search Partner', (0, 0, 220, 250), -1865940928, 1024, (8, 'Tahoma')], [130, 'Enter Name : ', -1, (8, 12, 80, 17), 1342177280], [129, '', 2076, (55, 10, 100, 12), 1350631552], [128, 'Search', 2077, (160, 10, 50, 14), 1342242816], ['SysListView32', 'List1', 2072, (8, 40, 200, 185), 1353711657], [128, 'Create New Partner', 2078, (10, 230, 100, 14), 1342242816], [128, 'Select', 2075, (130, 230, 40, 14), 1342242816], [128, 'Cancel', 2, (175, 230, 40, 14), 1342242816]], 'IDD_SYNC': [['Push to OpenERP', (0, 0, 470, 320), -1865940928, 1024, (8, 'Tahoma')], [128, 'Link to an Existing Documents ', 2024, (8, 5, 250, 290), 1342242823], [130, 'Search for : ', -1, (15, 17, 40, 12), 1342177280], [129, '', 40003, (60, 15, 120, 12), 1350631552], [128, 'Search', 40004, (187, 15, 40, 14), 1342242816], [130, 'Documents : ', -1, (15, 140, 100, 14), 1342177280], ['SysListView32', 'List1', 2026, (15, 150, 234, 110), 1350631433], [128, 'Push', 2019, (160, 270, 85, 14), 1342242816], [128, ' Create a Document ', 2024, (263, 5, 202, 100), 1342242823], [130, 'Type of Document : ', -1, (266, 25, 100, 12), 1342177280], [133, '', 2025, (332, 24, 75, 45), 1344339971], [128, 'Create', 2020, (412, 23, 50, 14), 1342242816], [128, ' Create a Contact ', 2024, (263, 110, 202, 185), 1342242823], [130, 'Create a New Contact : ', -1, (280, 140, 100, 12), 1342177280], [128, 'Create Contact', 2018, (360, 138, 60, 14), 1342242816], [128, 'Close', 2, (385, 300, 60, 14), 1342242816]]} - ids = {'IDC_BUT_DEL_OBJECT': 2012, 'IDC_DELAY1_SLIDER': 1056, 'IDC_PROGRESS': 1000, 'IDD_MANAGER': 101, 'IDC_ABOUT': 2028, 'IDD_DIAGNOSTIC': 113, 'IDET_PARTNER_COUNTRY': 2063, 'IDD_TRAINING': 102, 'ID_CONTACT_EMAIL_TEXT': 40008, 'IDC_DELAY2_TEXT': 1059, 'IDC_DELAY1_TEXT': 1057, 'IDD_WIZARD': 114, 'IDC_CHKBX': 2023, 'IDC_STATIC_HAM': 1002, 'IDC_PROGRESS_TEXT': 1001, 'IDR_XMLS_PROTOCOL': 2042, 'IDD_GENERAL': 108, 'IDD_ABOUT': 2027, 'IDD_SYNC': 40002, 'IDC_TAB': 1068, 'IDC_FOLDER_UNSURE': 1033, 'IDC_VERBOSE_LOG': 1061, 'IDC_EDIT1': 1094, 'IDC_BROWSE': 1037, 'ID_DB_DROPDOWNLIST': 2004, 'IDC_BACK_BTN': 1069, 'IDPB_PARTNER_SEARCH': 2077, 'IDD_WIZARD_FINISHED_UNCONFIGURED': 119, 'IDC_ACTION_CERTAIN': 1025, 'IDC_BUT_ACT_ALL': 1019, 'IDD_FILTER_NOW': 104, 'ID_PROTOCOL_GRP': 2040, 'IDC_HEADER': 2017, 'IDC_MARK_SPAM_AS_READ': 1047, 'ID_PARTNER_NAME_TEXT': 2036, 'IDC_RECOVER_RS': 1075, 'IDC_NAME_LIST1': 2037, 'ID_CONTACT_OFFICE_TEXT': 40006, 'IDC_STATIC': -1, 'IDC_PAGE_PLACEHOLDER': 1078, 'IDC_BROWSE_WATCH': 1039, 'IDET_ZIP': 40010, 'IDET_PARTNER_CITY': 40011, 'IDC_FOLDER_HAM': 1083, 'IDD_WIZARD_FOLDERS_REST': 117, 'IDC_SHOW_DATA_FOLDER': 1071, 'IDC_BUT_ACT_SCORE': 1018, '_APS_NEXT_RESOURCE_VALUE': 128, '_APS_NEXT_SYMED_VALUE': 101, 'IDC_CONTACT_LIST': 2029, 'IDC_SLIDER_CERTAIN': 1023, 'IDET_PARTNER_STREET': 2053, 'IDC_BUT_UNREAD': 1020, 'ID_PARTNER_DROPDOWNLIST': 2032, 'ID_COUNTRY_DROPLIST': 2065, 'IDC_BUT_ABOUT': 1017, 'IDC_BUT_RESCORE': 1008, 'IDC_BUT_SEARCHSUB': 1041, 'IDC_BUT_TRAIN_FROM_SPAM_FOLDER': 1010, 'IDET_PARTNER_MOBILENO': 2050, 'IDD_VIEW_PARTNER_DIALOG': 2044, 'IDD_WIZARD_FOLDERS_TRAIN': 120, 'IDC_BUT_FILTER_ENABLE': 1013, 'IDC_ABOUT_BTN': 1072, 'IDD_WIZARD_FINISHED_TRAINED': 122, 'ID_SERVER': 2001, 'IDD_SELECT_PARTNER': 2073, 'IDD_FOLDER_SELECTOR': 105, 'IDC_BUT_SET_SERVER_PORT': 2021, 'ID_DONE': 2008, 'IDC_LIST_FOLDERS': 1040, 'IDC_IMAGE_PATH': 2015, 'IDB_SBWIZLOGO': 125, 'IDB_OPENERPLOGO': 1062, 'ID_ZIP_TEXT': 2068, 'IDD_NEW_PARTNER_DIALOG': 2034, 'ID_PARTNER_DROPLIST': 2069, 'IDC_BUT_VIEW_LOG': 1093, 'IDC_STATUS2': 1044, 'IDC_STATUS1': 1043, 'IDCANCEL': 2, 'IDC_BROWSE_HAM': 1004, 'ID_BUT_TESTCONNECTION': 2007, 'IDR_NETRPC_PROTOCOL': 2043, 'IDC_BROWSE_SPAM': 1005, 'IDD_WIZARD_FINISHED_UNTRAINED': 116, 'IDC_MARK_UNSURE_AS_READ': 1051, 'ID_PARTNER_CITY_TEXT': 2067, 'IDC_BUT_WIZARD': 1070, 'IDC_VERSION': 1009, 'ID_NEW_PARTNER_BUTTON': 2033, 'IDC_FOLDER_NAMES': 1036, 'ID_ATT_METHOD_DROPDOWNLIST': 2025, 'IDC_BUT_TIMER_ENABLED': 1091, 'IDPB_WRITE_CHANGES': 2059, 'IDC_SLIDER_UNSURE': 1029, 'IDC_BUT_NEW': 1046, 'IDC_FOLDER_WATCH': 1038, 'IDPB_CREATE_NEW_PARTNER': 2078, 'IDC_BUT_UNTRAINED': 1088, 'IDC_STATIC_SPAM': 1003, 'IDD_NEW_CONTACT_DIALOG': 2031, 'IDC_EDIT_UNSURE': 1030, 'IDC_BUT_CLEARALL': 1042, 'IDC_BUT_UNSEEN': 1021, 'IDC_OBJECT_NAME': 2014, 'IDD_WIZARD_FOLDERS_WATCH': 118, 'IDC_BUT_SAVE_OBJECT': 2011, 'ID_FED_STATE_DROPLIST': 2064, 'ID_ALL_COUNTRY_DROPDOWNLIST': 2061, 'IDC_EDIT_CERTAIN': 1024, 'IDC_BUT_FILTER_DEFINE': 1016, 'ID_NEW_PART_BUTTON': 2070, 'ID_FAX_TEXT': 2066, 'IDD_WIZARD_TRAINING_IS_IMPORTANT': 123, 'ID_ALL_STATE_DROPDOWNLIST': 2060, 'IDC_INBOX_TIMER_ONLY': 1060, 'IDPB_SEARCH_PARTNER': 2052, 'ID_USERNAME': 2005, '_APS_NEXT_CONTROL_VALUE': 1096, 'IDC_WIZ_GRAPHIC': 1092, 'IDD_OBJECT_SETTINGS': 2009, 'IDD_FILTER_UNSURE': 111, 'IDC_DEL_SPAM_RS': 1074, 'ID_SERVER_PORT': 2003, 'IDR_XML_PROTOCOL': 2041, 'IDET_PARTNER_OFFICENO': 2048, 'IDB_FOLDERS': 127, 'IDC_BUT_PREPARATION': 1081, 'ID_STREET2_TEXT': 2063, 'IDC_DELAY2_SLIDER': 1058, 'IDET_PARTNER': 2064, 'IDC_SAVE_SPAM_SCORE': 1048, 'IDC_OBJECT_TITLE': 2013, 'IDC_FOLDER_CERTAIN': 1027, 'IDC_BROWSE_UNSURE': 1034, 'IDC_STATISTICS': 1095, 'ID_MAKE_ATTACHMENT': 2019, 'IDC_BUT_LOAD_IMAGE': 2010, 'IDC_NAME_LIST': 2026, 'IDC_BUT_TRAIN_TO_SPAM_FOLDER': 1011, 'IDET_PARTNER_SEARCH_NAME': 2076, 'IDC_BUT_RESET': 1073, 'IDET_PARTNER_CONTACT_NAME': 2046, 'ID_CONTACT_MOBILE_TEXT': 40007, 'IDC_ACTION_UNSURE': 1031, 'IDD_WIZARD_TRAIN': 121, 'IDC_STATIC_GROUP': 2024, 'IDPB_NEWPARTNER_BUTTON': 2071, 'ID_PARTNER_TEXT': 2079, 'IDD_WIZARD_FINISHED_TRAIN_LATER': 124, 'IDET_PARTNER_NAME': 2045, 'ID_CONTACT_NAME_TEXT': 40005, 'IDC_BUT_REBUILD': 1007, 'IDET_PARTNER_STREET2': 2054, 'ID_SAVE_PARTNER_BUTTON': 2035, 'IDPB_SELECT_PARTNER': 2075, 'ID_STREET_TEXT': 2062, '_APS_NEXT_COMMAND_VALUE': 40001, 'IDET_SEARCH_PARTNER': 2051, 'IDC_LIST_PARTNER': 2072, 'ID_PORT': 2002, 'IDD_SERVER_PORT_DIALOG': 2022, 'IDET_PARTNER_STATE': 2062, 'ID_SEARCH_TEXT': 40003, 'ID_SEARCH': 40004, 'ID_CREATE_CONTACT': 2018, 'IDC_FORWARD_BTN': 1077, 'IDC_TRAINING_STATUS': 1035, 'IDD_WIZARD_WELCOME': 115, 'IDET_PARTNER_FAX': 2058, 'IDC_BUT_TRAIN': 1089, 'IDC_LIST': 2016, 'ID_CREATE_CASE': 2020, 'IDET_PARTNER_EMAIL': 2047, 'IDC_START': 1006, 'IDD_FILTER': 103, 'IDC_RELOAD': 2038, 'ID_PASSWORD': 2006, 'ID_NAME_TEXT': 2030, 'IDC_FILTER_STATUS': 1014, 'ID_CONTACT_SAVE_BUTTON': 40009, 'IDOK': 1, 'IDC_BROWSE_CERTAIN': 1028, 'IDC_BUT_SHOW_DIAGNOSTICS': 1080, 'IDC_BUT_TRAIN_NOW': 1012} - names = {1024: 'IDC_EDIT_CERTAIN', 1: 'IDOK', 2: 'IDCANCEL', 1027: 'IDC_FOLDER_CERTAIN', 1028: 'IDC_BROWSE_CERTAIN', 1029: 'IDC_SLIDER_UNSURE', 1030: 'IDC_EDIT_UNSURE', 1031: 'IDC_ACTION_UNSURE', 1033: 'IDC_FOLDER_UNSURE', 1034: 'IDC_BROWSE_UNSURE', 1035: 'IDC_TRAINING_STATUS', 1036: 'IDC_FOLDER_NAMES', 1037: 'IDC_BROWSE', 1038: 'IDC_FOLDER_WATCH', 1039: 'IDC_BROWSE_WATCH', 1040: 'IDC_LIST_FOLDERS', 1041: 'IDC_BUT_SEARCHSUB', 1042: 'IDC_BUT_CLEARALL', 1043: 'IDC_STATUS1', 1044: 'IDC_STATUS2', 2069: 'ID_PARTNER_DROPLIST', 1046: 'IDC_BUT_NEW', 1047: 'IDC_MARK_SPAM_AS_READ', 1048: 'IDC_SAVE_SPAM_SCORE', 2052: 'IDPB_SEARCH_PARTNER', 1051: 'IDC_MARK_UNSURE_AS_READ', 2076: 'IDET_PARTNER_SEARCH_NAME', 2077: 'IDPB_PARTNER_SEARCH', 2078: 'IDPB_CREATE_NEW_PARTNER', 2053: 'IDET_PARTNER_STREET', 1056: 'IDC_DELAY1_SLIDER', 1057: 'IDC_DELAY1_TEXT', 1058: 'IDC_DELAY2_SLIDER', 1059: 'IDC_DELAY2_TEXT', 1060: 'IDC_INBOX_TIMER_ONLY', 1061: 'IDC_VERBOSE_LOG', 1062: 'IDB_OPENERPLOGO', 2047: 'IDET_PARTNER_EMAIL', 1068: 'IDC_TAB', 1069: 'IDC_BACK_BTN', 1070: 'IDC_BUT_WIZARD', 1071: 'IDC_SHOW_DATA_FOLDER', 1072: 'IDC_ABOUT_BTN', 1073: 'IDC_BUT_RESET', 1074: 'IDC_DEL_SPAM_RS', 1075: 'IDC_RECOVER_RS', 1077: 'IDC_FORWARD_BTN', 1078: 'IDC_PAGE_PLACEHOLDER', 2057: 'IDET_PARTNER_COUNTRY', 1080: 'IDC_BUT_SHOW_DIAGNOSTICS', 1081: 'IDC_BUT_PREPARATION', 1083: 'IDC_FOLDER_HAM', 2058: 'IDET_PARTNER_FAX', 1088: 'IDC_BUT_UNTRAINED', 1089: 'IDC_BUT_TRAIN', 40002: 'IDD_SYNC', 1091: 'IDC_BUT_TIMER_ENABLED', 1025: 'IDC_ACTION_CERTAIN', 1093: 'IDC_BUT_VIEW_LOG', 1094: 'IDC_EDIT1', 1095: 'IDC_STATISTICS', 1096: '_APS_NEXT_CONTROL_VALUE', 2060: 'ID_ALL_STATE_DROPDOWNLIST', 40010: 'IDET_ZIP', 40011: 'IDET_PARTNER_CITY', 2061: 'ID_ALL_COUNTRY_DROPDOWNLIST', 2062: 'IDET_PARTNER_STATE', 2063: 'IDET_PARTNER_COUNTRY', 2064: 'IDET_PARTNER', 101: 'IDD_MANAGER', 102: 'IDD_TRAINING', 103: 'IDD_FILTER', 104: 'IDD_FILTER_NOW', 105: 'IDD_FOLDER_SELECTOR', 106: 'IDD_ABOUT', 108: 'IDD_GENERAL', 2066: 'ID_FAX_TEXT', 111: 'IDD_FILTER_UNSURE', 113: 'IDD_DIAGNOSTIC', 114: 'IDD_WIZARD', 115: 'IDD_WIZARD_WELCOME', 116: 'IDD_WIZARD_FINISHED_UNTRAINED', 117: 'IDD_WIZARD_FOLDERS_REST', 118: 'IDD_WIZARD_FOLDERS_WATCH', 119: 'IDD_WIZARD_FINISHED_UNCONFIGURED', 120: 'IDD_WIZARD_FOLDERS_TRAIN', 121: 'IDD_WIZARD_TRAIN', 122: 'IDD_WIZARD_FINISHED_TRAINED', 123: 'IDD_WIZARD_TRAINING_IS_IMPORTANT', 124: 'IDD_WIZARD_FINISHED_TRAIN_LATER', 125: 'IDB_SBWIZLOGO', 127: 'IDB_FOLDERS', 2067: 'ID_PARTNER_CITY_TEXT', 2050: 'IDET_PARTNER_MOBILENO', 2070: 'ID_NEW_PART_BUTTON', 2071: 'IDPB_NEWPARTNER_BUTTON', 2072: 'IDC_LIST_PARTNER', 2073: 'IDD_SELECT_PARTNER', 2068: 'ID_ZIP_TEXT', 2051: 'IDET_SEARCH_PARTNER', 2075: 'IDPB_SELECT_PARTNER', 2079: 'ID_PARTNER_TEXT', 40004: 'ID_SEARCH', 2046: 'IDET_PARTNER_CONTACT_NAME', 2054: 'IDET_PARTNER_STREET2', 128: '_APS_NEXT_RESOURCE_VALUE', 2040: 'ID_PROTOCOL_GRP', 2065: 'ID_COUNTRY_DROPLIST', 2048: 'IDET_PARTNER_OFFICENO', 2024: 'IDC_STATIC_GROUP', 2041: 'IDR_XML_PROTOCOL', 2025: 'ID_ATT_METHOD_DROPDOWNLIST', 2026: 'IDC_NAME_LIST', 2027: 'IDD_ABOUT', 40001: '_APS_NEXT_COMMAND_VALUE', 2028: 'IDC_ABOUT', 2029: 'IDC_CONTACT_LIST', 2059: 'IDPB_WRITE_CHANGES', 2042: 'IDR_XMLS_PROTOCOL', 40003: 'ID_SEARCH_TEXT', 2030: 'ID_NAME_TEXT', 1092: 'IDC_WIZ_GRAPHIC', 2031: 'IDD_NEW_CONTACT_DIALOG', 40005: 'ID_CONTACT_NAME_TEXT', 2032: 'ID_PARTNER_DROPDOWNLIST', 40006: 'ID_CONTACT_OFFICE_TEXT', 2033: 'ID_NEW_PARTNER_BUTTON', 40007: 'ID_CONTACT_MOBILE_TEXT', 2034: 'IDD_NEW_PARTNER_DIALOG', 2043: 'IDR_NETRPC_PROTOCOL', 40008: 'ID_CONTACT_EMAIL_TEXT', 2035: 'ID_SAVE_PARTNER_BUTTON', 40009: 'ID_CONTACT_SAVE_BUTTON', 2036: 'ID_PARTNER_NAME_TEXT', 2037: 'IDC_NAME_LIST1', 2038: 'IDC_RELOAD', 2044: 'IDD_VIEW_PARTNER_DIALOG', 2001: 'ID_SERVER', 2002: 'ID_PORT', 2003: 'ID_SERVER_PORT', 2004: 'ID_DB_DROPDOWNLIST', 2005: 'ID_USERNAME', 2006: 'ID_PASSWORD', 2007: 'ID_BUT_TESTCONNECTION', 2008: 'ID_DONE', 2009: 'IDD_OBJECT_SETTINGS', 2010: 'IDC_BUT_LOAD_IMAGE', 2011: 'IDC_BUT_SAVE_OBJECT', 2012: 'IDC_BUT_DEL_OBJECT', 2013: 'IDC_OBJECT_TITLE', 2014: 'IDC_OBJECT_NAME', 2015: 'IDC_IMAGE_PATH', 2016: 'IDC_LIST', 2017: 'IDC_HEADER', 2018: 'ID_CREATE_CONTACT', 2019: 'ID_MAKE_ATTACHMENT', 2020: 'ID_CREATE_CASE', 2021: 'IDC_BUT_SET_SERVER_PORT', 2022: 'IDD_SERVER_PORT_DIALOG', 2023: 'IDC_CHKBX', 1000: 'IDC_PROGRESS', 1001: 'IDC_PROGRESS_TEXT', 1002: 'IDC_STATIC_HAM', 1003: 'IDC_STATIC_SPAM', 1004: 'IDC_BROWSE_HAM', 1005: 'IDC_BROWSE_SPAM', 1006: 'IDC_START', 1007: 'IDC_BUT_REBUILD', 1008: 'IDC_BUT_RESCORE', 1009: 'IDC_VERSION', 1010: 'IDC_BUT_TRAIN_FROM_SPAM_FOLDER', 1011: 'IDC_BUT_TRAIN_TO_SPAM_FOLDER', 1012: 'IDC_BUT_TRAIN_NOW', 1013: 'IDC_BUT_FILTER_ENABLE', 1014: 'IDC_FILTER_STATUS', 2045: 'IDET_PARTNER_NAME', 1016: 'IDC_BUT_FILTER_DEFINE', 1017: 'IDC_BUT_ABOUT', 1018: 'IDC_BUT_ACT_SCORE', 1019: 'IDC_BUT_ACT_ALL', 1020: 'IDC_BUT_UNREAD', 1021: 'IDC_BUT_UNSEEN', -1: 'IDC_STATIC', 1023: 'IDC_SLIDER_CERTAIN'} + dialogs = {'IDD_OPEN_DOCUEMNT_DIALOG': [['Open Document', (0, 0, 200, 65), -1865940928, 1024, (8, 'Tahoma')], [130, 'Link to Document : (If this link does not opens directly in web browser then copy an the link and paste in web browser.) ', -1, (5, 3, 190, 25), 1342177280], [129, '', 2086, (5, 31, 190, 12), 1350631552], [128, 'Ok', 2, (150, 45, 45, 14), 1342242816]], 'IDD_VIEW_PARTNER_DIALOG': [['Open Contact', (0, 0, 350, 215), -1865940928, 1024, (8, 'Tahoma')], [130, 'Email ID : ', -1, (32, 17, 40, 12), 1342177280], [129, '', 2051, (70, 15, 200, 12), 1350631552], [128, 'Search Contact ', 2052, (280, 15, 60, 14), 1342242816], [130, 'Partner Name : ', -1, (13, 42, 50, 17), 1342177280], [129, '', 2064, (70, 42, 150, 12), 1350568064], [128, 'Search Partner', 2070, (225, 41, 60, 14), 1342242816], [128, 'New Partner', 2093, (290, 41, 50, 14), 1342242816], [128, 'Postal Address ', 2024, (10, 65, 175, 125), 1342177287], [130, 'Contact Name : ', -1, (18, 83, 50, 17), 1342177280], [129, '', 2046, (76, 82, 100, 12), 1350631552], [130, 'Street : ', -1, (18, 97, 50, 17), 1342177280], [129, '', 2053, (76, 96, 100, 12), 1350631552], [130, 'Street2 : ', -1, (18, 112, 50, 17), 1342177280], [129, '', 2054, (76, 111, 100, 12), 1350631552], [130, 'Zip : ', -1, (18, 126, 50, 14), 1342177280], [129, '', 40010, (76, 125, 100, 12), 1350631552], [130, 'City : ', -1, (18, 140, 50, 17), 1342177280], [129, '', 40011, (76, 139, 100, 12), 1350631552], [130, 'Fed. State : ', -1, (18, 154, 50, 17), 1342177280], [129, '', 2062, (76, 153, 54, 12), 1350568064], [128, 'Search', 2104, (135, 153, 40, 12), 1342242816], [130, 'Country :', -1, (18, 169, 35, 17), 1342177280], [129, '', 2063, (76, 168, 54, 12), 1350568064], [128, 'Search', 2105, (135, 168, 40, 12), 1342242816], [128, 'Communication ', 2024, (188, 65, 152, 125), 1342177287], [130, 'Phone : ', -1, (194, 83, 30, 17), 1342177280], [129, '', 2048, (224, 82, 100, 12), 1350631552], [130, 'Mobile : ', -1, (194, 97, 30, 17), 1342177280], [129, '', 2050, (224, 96, 100, 12), 1350631552], [130, 'Email : ', -1, (194, 111, 30, 17), 1342177280], [129, '', 2058, (224, 110, 100, 12), 1350568064], [130, 'Fax : ', -1, (194, 125, 30, 17), 1342177280], [129, '', 2047, (224, 124, 100, 12), 1350631552], [128, 'Create a New Contact', 2071, (124, 195, 82, 14), 1342242816], [128, 'Save', 2059, (213, 195, 60, 14), 1342242816], [128, 'Cancel', 2, (281, 195, 60, 14), 1342242816]], 'IDD_OPEN_PARTNER_DIALOG': [['Open Partner', (0, 0, 200, 65), -1865940928, 1024, (8, 'Tahoma')], [130, 'Link to Partner : (If this link does not opens directly in web browser then copy an the link and paste in web browser.) ', -1, (5, 3, 190, 25), 1342177280], [129, '', 2085, (5, 31, 190, 12), 1350631552], [128, 'Ok', 2, (150, 45, 45, 13), 1342242816]], 'IDD_SELECT_STATE': [['Search Country', (0, 0, 220, 250), -1865940928, 1024, (8, 'Tahoma')], [130, 'Enter Name : ', -1, (8, 12, 80, 17), 1342177280], [129, '', 2100, (55, 10, 100, 12), 1350631552], [128, 'Search', 40012, (160, 10, 50, 14), 1342242816], ['SysListView32', 'List1', 2101, (8, 40, 200, 185), 1353711657], [128, 'Select', 2102, (170, 230, 40, 14), 1342242816]], 'IDD_GENERAL': [['Connection Parameters', (0, 0, 430, 210), 1355284544, None, (8, 'Tahoma')], [128, '', 2024, (10, 10, 250, 130), 1342177287], [130, 'Server : ', -1, (30, 30, 100, 17), 1342177280], [129, '', 2003, (85, 30, 120, 12), 1350633472], [128, 'Change', 2021, (210, 30, 30, 13), 1342242816], [130, 'Database : ', -1, (30, 50, 100, 17), 1342177280], [133, '', 2004, (85, 50, 120, 40), 1344339971], [128, 'Reload', 2038, (210, 50, 30, 13), 1342242816], [130, 'Username : ', -1, (30, 70, 100, 17), 1342177280], [129, '', 2005, (85, 70, 154, 12), 1350631552], [130, 'Password : ', -1, (30, 90, 100, 17), 1342177280], [129, '', 2006, (85, 90, 154, 12), 1350631584], [128, 'Connect', 2007, (179, 110, 60, 13), 1342242816], [128, 'WebServer Parameters', 2024, (270, 10, 150, 130), 1342177287], [130, 'Server : ', -1, (280, 30, 50, 15), 1342177280], [129, '', 2080, (310, 29, 90, 12), 1350568064], [128, 'Change', 2082, (295, 50, 50, 12), 1342242816], [128, 'Connect', 2083, (350, 50, 50, 12), 1342242816]], 'IDD_OBJECT_SETTINGS': [['Documents Setting', (0, 0, 430, 210), 1355284672, 1024, (8, 'Tahoma')], [128, 'Document Attributes', 2024, (2, 2, 340, 32), 1342177287], [130, 'Title', -1, (6, 15, 30, 17), 1342177280], [129, '', 2013, (20, 14, 57, 12), 1350631552], [130, 'Document Name', -1, (83, 15, 60, 17), 1342177280], [129, '', 2014, (138, 14, 57, 12), 1350631552], [130, 'Image', -1, (200, 15, 20, 17), 1342177280], [129, '', 2015, (220, 14, 57, 12), 1350631552], [128, 'Load Image', 2010, (286, 13, 50, 15), 1342242816], [128, 'Add', 2011, (347, 13, 38, 15), 1342242816], [128, 'Remove', 2012, (391, 13, 38, 15), 1342242816], ['SysListView32', 'List1', 2016, (8, 40, 535, 160), 1353711657]], 'IDD_NEW_PARTNER_DIALOG': [['Create a New Partner', (0, 0, 140, 40), -1865940928, 1024, (8, 'Tahoma')], [130, 'Name : ', -1, (5, 3, 100, 17), 1342177280], [129, '', 2036, (40, 3, 94, 12), 1350631552], [128, 'Cancel', 2, (90, 22, 45, 14), 1342242816], [128, 'Save', 2035, (40, 22, 45, 14), 1342242817]], 'IDD_MANAGER': [['OpenERP Configuarion', (0, 0, 460, 260), -1865940800, None, (8, 'Tahoma')], [128, 'Close', 2008, (400, 239, 50, 14), 1342177281], ['SysTabControl32', '', 1068, (8, 7, 440, 228), 1342177280], ['SysListView32', '', 2016, (0, 0, 0, 0), 1353711657]], 'IDD_WEB_SERVER_PORT_DIALOG': [['OpenERP Connection', (0, 0, 160, 55), -1865940928, 1024, (8, 'Tahoma')], [130, 'Server : ', -1, (5, 3, 150, 17), 1342177280], [129, '', 2089, (40, 3, 100, 12), 1350631552], [130, 'Port : ', -1, (5, 18, 100, 17), 1342177280], [129, '', 2090, (40, 18, 100, 12), 1350631552], [128, 'Close', 2, (110, 35, 45, 14), 1342242816], [128, 'OK', 2091, (60, 35, 45, 14), 1342242817]], 'IDD_ABOUT': [['About', (0, 0, 430, 210), 1355284672, 1024, (8, 'Tahoma')], [128, 'About Plugin', -1, (7, 3, 422, 200), 1342177287], [130, '1062', 1062, (60, 30, 20, 20), 1342179342], [130, '', 2028, (80, 90, 300, 100), 1342177280]], 'IDD_NEW_CONTACT_DIALOG': [['Create a New Contact', (0, 0, 350, 180), -1865940928, 1024, (8, 'Tahoma')], [130, 'Select Partner : ', -1, (13, 20, 50, 17), 1342177280], [129, '', 2079, (70, 18, 150, 12), 1350568064], [128, 'Search Partner', 2033, (225, 17, 60, 14), 1342242816], [128, 'New Partner', 2092, (290, 17, 50, 14), 1342242816], [128, 'Postal Address ', 2024, (10, 35, 175, 123), 1342177287], [130, 'Contact Name : ', -1, (18, 53, 100, 17), 1342177280], [129, '', 40005, (76, 52, 100, 12), 1350631552], [130, 'Street : ', -1, (18, 67, 40, 17), 1342177280], [129, '', 2062, (76, 66, 100, 12), 1350631552], [130, 'Street2 : ', -1, (18, 81, 40, 17), 1342177280], [129, '', 2063, (76, 80, 100, 12), 1350631552], [130, 'Zip : ', -1, (18, 94, 50, 17), 1342177280], [129, '', 2068, (76, 93, 100, 12), 1350631552], [130, 'City : ', -1, (18, 106, 50, 17), 1342177280], [129, '', 2067, (76, 107, 100, 12), 1350631552], [130, 'Fed. State : ', -1, (18, 121, 50, 17), 1342177280], [129, '', 2106, (76, 122, 54, 12), 1350568064], [128, 'Search', 2107, (135, 121, 40, 12), 1342242816], [130, 'Country :', -1, (18, 134, 35, 17), 1342177280], [129, '', 2108, (76, 135, 54, 12), 1350568064], [128, 'Search', 2109, (135, 136, 40, 12), 1342242816], [128, 'Communication ', 2024, (188, 35, 150, 123), 1342177287], [130, 'Office : ', -1, (194, 53, 30, 17), 1342177280], [129, '', 40006, (224, 52, 100, 12), 1350631552], [130, 'Mobile : ', -1, (194, 67, 30, 17), 1342177280], [129, '', 40007, (224, 66, 100, 12), 1350631552], [130, 'Fax : ', -1, (194, 81, 30, 17), 1342177280], [129, '', 2066, (224, 80, 100, 12), 1350631552], [130, 'Email : ', -1, (194, 95, 30, 17), 1342177280], [129, '', 40008, (224, 94, 100, 12), 1350631552], [128, 'Cancel', 2, (290, 162, 45, 13), 1342242816], [128, 'Save', 40009, (240, 162, 45, 13), 1342242816]], 'IDD_SERVER_PORT_DIALOG': [['OpenERP Connection', (0, 0, 160, 55), -1865940928, 1024, (8, 'Tahoma')], [130, 'Server : ', -1, (5, 3, 150, 17), 1342177280], [129, '', 2001, (40, 3, 100, 12), 1350631552], [130, 'Port : ', -1, (5, 18, 100, 17), 1342177280], [129, '', 2002, (40, 18, 100, 12), 1350631552], [128, 'Close', 2, (110, 35, 45, 14), 1342242816], [128, 'OK', 1, (60, 35, 45, 14), 1342242817]], 'IDD_SELECT_PARTNER': [['Search Partner', (0, 0, 220, 250), -1865940928, 1024, (8, 'Tahoma')], [130, 'Enter Name : ', -1, (8, 12, 80, 17), 1342177280], [129, '', 2076, (55, 10, 100, 12), 1350631552], [128, 'Search', 2077, (160, 10, 50, 14), 1342242816], ['SysListView32', 'List1', 2072, (8, 40, 200, 185), 1353711657], [128, 'Create New Partner', 2078, (10, 230, 100, 14), 1342242816], [128, 'Select', 2075, (170, 230, 40, 14), 1342242816]], 'IDD_SYNC': [['Push to OpenERP', (0, 0, 470, 320), -1865940928, 1024, (8, 'Tahoma')], [128, 'Link to an Existing Documents ', 2024, (8, 5, 250, 290), 1342242823], [130, 'Search for : ', -1, (15, 17, 40, 12), 1342177280], [129, '', 40003, (60, 15, 120, 12), 1350631552], [128, 'Search', 40004, (187, 15, 40, 14), 1342242816], [130, 'Documents : ', -1, (15, 140, 100, 14), 1342177280], ['SysListView32', 'List1', 2026, (15, 150, 234, 110), 1350631433], [128, 'Push', 2019, (160, 270, 85, 14), 1342242816], [128, ' Create a Document ', 2024, (263, 5, 202, 100), 1342242823], [130, 'Type of Document : ', -1, (266, 25, 100, 12), 1342177280], [133, '', 2025, (332, 24, 75, 45), 1344339971], [128, 'Create', 2020, (412, 23, 50, 14), 1342242816], [128, ' Create a Contact ', 2024, (263, 110, 202, 185), 1342242823], [130, 'Create a New Contact : ', -1, (280, 140, 100, 12), 1342177280], [128, 'Create Contact', 2018, (360, 138, 60, 14), 1342242816], [128, 'Close', 2, (385, 300, 60, 14), 1342242816]], 'IDD_SELECT_COUNTRY': [['Search Country', (0, 0, 220, 250), -1865940928, 1024, (8, 'Tahoma')], [130, 'Enter Name : ', -1, (8, 12, 80, 17), 1342177280], [129, '', 2095, (55, 10, 100, 12), 1350631552], [128, 'Search', 2098, (160, 10, 50, 14), 1342242816], ['SysListView32', 'List1', 2096, (8, 40, 200, 185), 1353711657], [128, 'Select', 2097, (170, 230, 40, 14), 1342242816]]} + ids = {'IDC_BUT_DEL_OBJECT': 2012, 'IDD_OPEN_PARTNER_DIALOG': 2084, 'IDD_SELECT_STATE': 2099, 'IDC_DELAY1_SLIDER': 1056, 'IDC_PROGRESS': 1000, 'IDD_MANAGER': 101, 'IDC_ABOUT': 2028, 'IDD_DIAGNOSTIC': 113, 'IDET_PARTNER_COUNTRY': 2063, 'IDD_TRAINING': 102, 'ID_CONTACT_EMAIL_TEXT': 40008, 'IDC_DELAY2_TEXT': 1059, 'IDC_DELAY1_TEXT': 1057, 'IDD_WIZARD': 114, 'IDC_CHKBX': 2023, 'IDC_STATIC_HAM': 1002, 'IDC_PROGRESS_TEXT': 1001, 'IDR_XMLS_PROTOCOL': 2042, 'IDD_GENERAL': 108, 'IDD_ABOUT': 2027, 'IDD_SYNC': 40002, 'IDC_TAB': 1068, 'IDC_FOLDER_UNSURE': 1033, '_APS_NEXT_SYMED_VALUE': 101, 'IDC_VERBOSE_LOG': 1061, 'IDC_EDIT1': 1094, 'IDC_BROWSE': 1037, 'ID_DB_DROPDOWNLIST': 2004, 'IDC_BACK_BTN': 1069, 'ID_CONTACT_NAME_TEXT': 40005, 'IDPB_PARTNER_SEARCH': 2077, 'IDD_WIZARD_FINISHED_UNCONFIGURED': 119, 'IDC_ACTION_CERTAIN': 1025, 'IDC_BUT_ACT_ALL': 1019, 'IDD_FILTER_NOW': 104, 'IDET_WED_SERVER': 2080, 'ID_WEB_OK': 2091, 'ID_PROTOCOL_GRP': 2040, 'IDC_HEADER': 2017, 'IDC_MARK_SPAM_AS_READ': 1047, 'IDPB_NEW_PARTNER_BUTTON': 2092, 'ID_PARTNER_NAME_TEXT': 2036, 'IDC_RECOVER_RS': 1075, 'IDC_NAME_LIST1': 2037, 'ID_CONTACT_OFFICE_TEXT': 40006, 'IDC_STATIC': -1, 'IDC_PAGE_PLACEHOLDER': 1078, 'IDC_BROWSE_WATCH': 1039, 'IDET_ZIP': 40010, 'IDET_PARTNER_CITY': 40011, 'IDET_PARTNER_LINK_TEXT': 2085, 'IDC_FOLDER_HAM': 1083, 'IDC_LIST_COUNTRY': 2096, 'IDD_WIZARD_FOLDERS_REST': 117, 'IDC_SHOW_DATA_FOLDER': 1071, 'IDC_BUT_ACT_SCORE': 1018, 'IDET_STATE_SEARCH_NAME': 2100, 'IDET_WEB_SERVER': 2089, '_APS_NEXT_RESOURCE_VALUE': 128, 'ID_SET_WEB_CONNECTION': 2082, 'IDC_LIST_STATE': 2101, 'IDC_CONTACT_LIST': 2029, 'IDC_SLIDER_CERTAIN': 1023, 'IDET_PARTNER_STREET': 2053, 'IDC_BUT_UNREAD': 1020, 'ID_PARTNER_DROPDOWNLIST': 2032, 'ID_COUNTRY_DROPLIST': 2065, 'IDC_BUT_ABOUT': 1017, 'IDC_BUT_RESCORE': 1008, 'IDC_BUT_SEARCHSUB': 1041, 'IDC_BUT_TRAIN_FROM_SPAM_FOLDER': 1010, 'IDET_PARTNER_MOBILENO': 2050, 'ID_CONTACT_MOBILE_TEXT': 40007, 'IDD_VIEW_PARTNER_DIALOG': 2044, 'IDD_WIZARD_FOLDERS_TRAIN': 120, 'IDC_BUT_FILTER_ENABLE': 1013, 'IDPB_WEB_CONNECTION': 2083, 'IDC_ABOUT_BTN': 1072, 'IDD_WIZARD_FINISHED_TRAINED': 122, 'ID_SERVER': 2001, 'IDD_SELECT_PARTNER': 2073, 'IDET_NC_PARTNER_STATE': 2106, 'IDD_FOLDER_SELECTOR': 105, 'IDC_BUT_SET_SERVER_PORT': 2021, 'ID_DONE': 2008, 'IDC_LIST_FOLDERS': 1040, 'IDC_IMAGE_PATH': 2015, 'IDB_SBWIZLOGO': 125, 'IDB_OPENERPLOGO': 1062, 'ID_ZIP_TEXT': 2068, 'IDEB_OPENDOC_LINK_TEXT': 2086, 'IDD_NEW_PARTNER_DIALOG': 2034, 'ID_PARTNER_DROPLIST': 2069, 'IDC_BUT_VIEW_LOG': 1093, 'IDC_STATUS2': 1044, 'IDC_STATUS1': 1043, 'IDCANCEL': 2, 'IDC_BROWSE_HAM': 1004, 'ID_BUT_TESTCONNECTION': 2007, 'IDR_NETRPC_PROTOCOL': 2043, 'IDC_BROWSE_SPAM': 1005, 'IDD_OPEN_DOCUEMNT_DIALOG': 2087, 'IDD_WIZARD_FINISHED_UNTRAINED': 116, 'IDC_MARK_UNSURE_AS_READ': 1051, 'IDPB_SEARCH_COUNTRY1': 2105, 'ID_PARTNER_CITY_TEXT': 2067, 'IDC_BUT_WIZARD': 1070, 'IDC_VERSION': 1009, 'ID_NEW_PARTNER_BUTTON': 2033, 'IDC_FOLDER_NAMES': 1036, 'ID_ATT_METHOD_DROPDOWNLIST': 2025, 'IDC_BUT_TIMER_ENABLED': 1091, 'IDPB_WRITE_CHANGES': 2059, 'IDC_SLIDER_UNSURE': 1029, 'IDC_BUT_NEW': 1046, 'IDC_FOLDER_WATCH': 1038, 'IDPB_CREATE_NEW_PARTNER': 2078, 'IDC_BUT_UNTRAINED': 1088, 'IDC_STATIC_SPAM': 1003, 'IDD_NEW_CONTACT_DIALOG': 2031, 'IDC_EDIT_UNSURE': 1030, 'IDC_BUT_CLEARALL': 1042, 'IDC_BUT_UNSEEN': 1021, 'IDC_OBJECT_NAME': 2014, 'IDD_WIZARD_FOLDERS_WATCH': 118, 'IDPB_SEARCH_STATE': 2103, 'IDET_COUNTRY_SEARCH_NAME': 2095, 'IDC_BUT_SAVE_OBJECT': 2011, 'ID_FED_STATE_DROPLIST': 2064, 'ID_ALL_COUNTRY_DROPDOWNLIST': 2061, 'IDC_EDIT_CERTAIN': 1024, 'IDC_BUT_FILTER_DEFINE': 1016, 'ID_NEW_PART_BUTTON': 2070, 'ID_FAX_TEXT': 2066, 'IDD_WIZARD_TRAINING_IS_IMPORTANT': 123, 'ID_ALL_STATE_DROPDOWNLIST': 2060, 'IDPB_SEARCH_STATE1': 2104, 'IDC_INBOX_TIMER_ONLY': 1060, 'IDPB_SEARCH_PARTNER': 2052, 'ID_USERNAME': 2005, '_APS_NEXT_CONTROL_VALUE': 1096, 'IDC_WIZ_GRAPHIC': 1092, 'IDD_OBJECT_SETTINGS': 2009, 'IDD_FILTER_UNSURE': 111, 'IDC_DEL_SPAM_RS': 1074, 'IDD_SELECT_COUNTRY': 2094, 'ID_SERVER_PORT': 2003, 'IDR_XML_PROTOCOL': 2041, 'IDET_PARTNER_OFFICENO': 2048, 'IDB_FOLDERS': 127, 'IDC_BUT_PREPARATION': 1081, 'ID_STREET2_TEXT': 2063, 'IDC_DELAY2_SLIDER': 1058, 'IDET_PARTNER': 2064, 'IDC_SAVE_SPAM_SCORE': 1048, 'IDC_OBJECT_TITLE': 2013, 'IDC_FOLDER_CERTAIN': 1027, 'IDET_WEB_PORT': 2090, 'IDC_BROWSE_UNSURE': 1034, 'IDC_STATISTICS': 1095, 'IDPB_STATE_SEARCH': 40012, 'ID_MAKE_ATTACHMENT': 2019, 'IDC_BUT_LOAD_IMAGE': 2010, 'IDC_NAME_LIST': 2026, 'IDC_BUT_TRAIN_TO_SPAM_FOLDER': 1011, 'IDET_PARTNER_SEARCH_NAME': 2076, 'IDC_BUT_RESET': 1073, 'ID_SEARCH': 40004, 'IDET_PARTNER_CONTACT_NAME': 2046, 'IDPB_SELECT_STATE': 2102, 'IDC_ACTION_UNSURE': 1031, 'IDD_WIZARD_TRAIN': 121, 'IDC_STATIC_GROUP': 2024, 'IDPB_NEWPARTNER_BUTTON': 2071, 'ID_PARTNER_TEXT': 2079, 'IDD_WIZARD_FINISHED_TRAIN_LATER': 124, 'IDET_PARTNER_NAME': 2045, 'IDPB_NEW_PART_BUTTON': 2093, 'IDC_BUT_REBUILD': 1007, 'IDET_PARTNER_STREET2': 2054, 'IDPB_SEARCH_COUNTRY': 2098, 'ID_SAVE_PARTNER_BUTTON': 2035, 'IDPB_SELECT_PARTNER': 2075, 'ID_STREET_TEXT': 2062, '_APS_NEXT_COMMAND_VALUE': 40001, 'IDET_SEARCH_PARTNER': 2051, 'IDC_LIST_PARTNER': 2072, 'IDD_WEB_SERVER_PORT_DIALOG': 2088, 'ID_PORT': 2002, 'IDD_SERVER_PORT_DIALOG': 2022, 'IDET_PARTNER_STATE': 2062, 'IDPB_SELECT_COUNTRY': 2097, 'ID_SEARCH_TEXT': 40003, 'IDET_NC_PARTNER_COUNTRY': 2108, 'ID_CREATE_CONTACT': 2018, 'IDC_FORWARD_BTN': 1077, 'IDC_TRAINING_STATUS': 1035, 'IDD_WIZARD_WELCOME': 115, 'IDET_PARTNER_FAX': 2058, 'IDC_BUT_TRAIN': 1089, 'IDC_LIST': 2016, 'ID_CREATE_CASE': 2020, 'IDET_PARTNER_EMAIL': 2047, 'IDC_START': 1006, 'IDD_FILTER': 103, 'IDC_RELOAD': 2038, 'ID_PASSWORD': 2006, 'ID_NAME_TEXT': 2030, 'IDC_FILTER_STATUS': 1014, 'IDPB_NC_SEARCH_STATE1': 2107, 'ID_CONTACT_SAVE_BUTTON': 40009, 'IDOK': 1, 'IDC_BROWSE_CERTAIN': 1028, 'IDC_BUT_SHOW_DIAGNOSTICS': 1080, 'IDC_BUT_TRAIN_NOW': 1012, 'IDPB_NC_SEARCH_COUNTRY1': 2109} + names = {1024: 'IDC_EDIT_CERTAIN', 1: 'IDOK', 2: 'IDCANCEL', 1027: 'IDC_FOLDER_CERTAIN', 1028: 'IDC_BROWSE_CERTAIN', 1029: 'IDC_SLIDER_UNSURE', 1030: 'IDC_EDIT_UNSURE', 1031: 'IDC_ACTION_UNSURE', 1033: 'IDC_FOLDER_UNSURE', 1034: 'IDC_BROWSE_UNSURE', 1035: 'IDC_TRAINING_STATUS', 1036: 'IDC_FOLDER_NAMES', 1037: 'IDC_BROWSE', 1038: 'IDC_FOLDER_WATCH', 1039: 'IDC_BROWSE_WATCH', 1040: 'IDC_LIST_FOLDERS', 1041: 'IDC_BUT_SEARCHSUB', 1042: 'IDC_BUT_CLEARALL', 1043: 'IDC_STATUS1', 1044: 'IDC_STATUS2', 2069: 'ID_PARTNER_DROPLIST', 1046: 'IDC_BUT_NEW', 1047: 'IDC_MARK_SPAM_AS_READ', 1048: 'IDC_SAVE_SPAM_SCORE', 2052: 'IDPB_SEARCH_PARTNER', 1051: 'IDC_MARK_UNSURE_AS_READ', 2076: 'IDET_PARTNER_SEARCH_NAME', 2077: 'IDPB_PARTNER_SEARCH', 2078: 'IDPB_CREATE_NEW_PARTNER', 2053: 'IDET_PARTNER_STREET', 1056: 'IDC_DELAY1_SLIDER', 1057: 'IDC_DELAY1_TEXT', 1058: 'IDC_DELAY2_SLIDER', 1059: 'IDC_DELAY2_TEXT', 1060: 'IDC_INBOX_TIMER_ONLY', 1061: 'IDC_VERBOSE_LOG', 1062: 'IDB_OPENERPLOGO', 2047: 'IDET_PARTNER_EMAIL', 2088: 'IDD_WEB_SERVER_PORT_DIALOG', 2089: 'IDET_WEB_SERVER', 2090: 'IDET_WEB_PORT', 2091: 'ID_WEB_OK', 1068: 'IDC_TAB', 1069: 'IDC_BACK_BTN', 1070: 'IDC_BUT_WIZARD', 1071: 'IDC_SHOW_DATA_FOLDER', 1072: 'IDC_ABOUT_BTN', 1073: 'IDC_BUT_RESET', 1074: 'IDC_DEL_SPAM_RS', 1075: 'IDC_RECOVER_RS', 2100: 'IDET_STATE_SEARCH_NAME', 1077: 'IDC_FORWARD_BTN', 1078: 'IDC_PAGE_PLACEHOLDER', 2057: 'IDET_PARTNER_COUNTRY', 1080: 'IDC_BUT_SHOW_DIAGNOSTICS', 1081: 'IDC_BUT_PREPARATION', 2106: 'IDET_NC_PARTNER_STATE', 1083: 'IDC_FOLDER_HAM', 2108: 'IDET_NC_PARTNER_COUNTRY', 2058: 'IDET_PARTNER_FAX', 1088: 'IDC_BUT_UNTRAINED', 1089: 'IDC_BUT_TRAIN', 40002: 'IDD_SYNC', 1091: 'IDC_BUT_TIMER_ENABLED', 1025: 'IDC_ACTION_CERTAIN', 1093: 'IDC_BUT_VIEW_LOG', 1094: 'IDC_EDIT1', 1095: 'IDC_STATISTICS', 1096: '_APS_NEXT_CONTROL_VALUE', 2060: 'ID_ALL_STATE_DROPDOWNLIST', 40010: 'IDET_ZIP', 40011: 'IDET_PARTNER_CITY', 40012: 'IDPB_STATE_SEARCH', 2061: 'ID_ALL_COUNTRY_DROPDOWNLIST', 2062: 'IDET_PARTNER_STATE', 2063: 'IDET_PARTNER_COUNTRY', 2064: 'IDET_PARTNER', 101: 'IDD_MANAGER', 102: 'IDD_TRAINING', 103: 'IDD_FILTER', 104: 'IDD_FILTER_NOW', 105: 'IDD_FOLDER_SELECTOR', 106: 'IDD_ABOUT', 108: 'IDD_GENERAL', 2066: 'ID_FAX_TEXT', 111: 'IDD_FILTER_UNSURE', 113: 'IDD_DIAGNOSTIC', 114: 'IDD_WIZARD', 115: 'IDD_WIZARD_WELCOME', 116: 'IDD_WIZARD_FINISHED_UNTRAINED', 117: 'IDD_WIZARD_FOLDERS_REST', 118: 'IDD_WIZARD_FOLDERS_WATCH', 119: 'IDD_WIZARD_FINISHED_UNCONFIGURED', 120: 'IDD_WIZARD_FOLDERS_TRAIN', 121: 'IDD_WIZARD_TRAIN', 122: 'IDD_WIZARD_FINISHED_TRAINED', 123: 'IDD_WIZARD_TRAINING_IS_IMPORTANT', 124: 'IDD_WIZARD_FINISHED_TRAIN_LATER', 125: 'IDB_SBWIZLOGO', 127: 'IDB_FOLDERS', 2067: 'ID_PARTNER_CITY_TEXT', 2050: 'IDET_PARTNER_MOBILENO', 2070: 'ID_NEW_PART_BUTTON', 2071: 'IDPB_NEWPARTNER_BUTTON', 2072: 'IDC_LIST_PARTNER', 2073: 'IDD_SELECT_PARTNER', 2068: 'ID_ZIP_TEXT', 2051: 'IDET_SEARCH_PARTNER', 2075: 'IDPB_SELECT_PARTNER', 2079: 'ID_PARTNER_TEXT', 2080: 'IDET_WED_SERVER', 2081: 'IDET_WEB_PORT', 2082: 'ID_SET_WEB_CONNECTION', 2083: 'IDPB_WEB_CONNECTION', 2084: 'IDD_OPEN_PARTNER_DIALOG', 2085: 'IDET_PARTNER_LINK_TEXT', 40004: 'ID_SEARCH', 2086: 'IDEB_OPENDOC_LINK_TEXT', 2087: 'IDD_OPEN_DOCUEMNT_DIALOG', 2046: 'IDET_PARTNER_CONTACT_NAME', 2105: 'IDPB_SEARCH_COUNTRY1', 2054: 'IDET_PARTNER_STREET2', 128: '_APS_NEXT_RESOURCE_VALUE', 2092: 'IDPB_NEW_PARTNER_BUTTON', 2093: 'IDPB_NEW_PART_BUTTON', 2094: 'IDD_SELECT_COUNTRY', 2095: 'IDET_COUNTRY_SEARCH_NAME', 2096: 'IDC_LIST_COUNTRY', 2097: 'IDPB_SELECT_COUNTRY', 2098: 'IDPB_SEARCH_COUNTRY', 2099: 'IDD_SELECT_STATE', 2101: 'IDC_LIST_STATE', 2102: 'IDPB_SELECT_STATE', 2103: 'IDPB_SEARCH_STATE', 2104: 'IDPB_SEARCH_STATE1', 2040: 'ID_PROTOCOL_GRP', 2065: 'ID_COUNTRY_DROPLIST', 2048: 'IDET_PARTNER_OFFICENO', 2107: 'IDPB_NC_SEARCH_STATE1', 2109: 'IDPB_NC_SEARCH_COUNTRY1', 2024: 'IDC_STATIC_GROUP', 2041: 'IDR_XML_PROTOCOL', 2025: 'ID_ATT_METHOD_DROPDOWNLIST', 2026: 'IDC_NAME_LIST', 2027: 'IDD_ABOUT', 40001: '_APS_NEXT_COMMAND_VALUE', 2028: 'IDC_ABOUT', 2029: 'IDC_CONTACT_LIST', 2059: 'IDPB_WRITE_CHANGES', 2042: 'IDR_XMLS_PROTOCOL', 40003: 'ID_SEARCH_TEXT', 2030: 'ID_NAME_TEXT', 1092: 'IDC_WIZ_GRAPHIC', 2031: 'IDD_NEW_CONTACT_DIALOG', 40005: 'ID_CONTACT_NAME_TEXT', 2032: 'ID_PARTNER_DROPDOWNLIST', 40006: 'ID_CONTACT_OFFICE_TEXT', 2033: 'ID_NEW_PARTNER_BUTTON', 40007: 'ID_CONTACT_MOBILE_TEXT', 2034: 'IDD_NEW_PARTNER_DIALOG', 2043: 'IDR_NETRPC_PROTOCOL', 40008: 'ID_CONTACT_EMAIL_TEXT', 2035: 'ID_SAVE_PARTNER_BUTTON', 40009: 'ID_CONTACT_SAVE_BUTTON', 2036: 'ID_PARTNER_NAME_TEXT', 2037: 'IDC_NAME_LIST1', 2038: 'IDC_RELOAD', 2044: 'IDD_VIEW_PARTNER_DIALOG', 2001: 'ID_SERVER', 2002: 'ID_PORT', 2003: 'ID_SERVER_PORT', 2004: 'ID_DB_DROPDOWNLIST', 2005: 'ID_USERNAME', 2006: 'ID_PASSWORD', 2007: 'ID_BUT_TESTCONNECTION', 2008: 'ID_DONE', 2009: 'IDD_OBJECT_SETTINGS', 2010: 'IDC_BUT_LOAD_IMAGE', 2011: 'IDC_BUT_SAVE_OBJECT', 2012: 'IDC_BUT_DEL_OBJECT', 2013: 'IDC_OBJECT_TITLE', 2014: 'IDC_OBJECT_NAME', 2015: 'IDC_IMAGE_PATH', 2016: 'IDC_LIST', 2017: 'IDC_HEADER', 2018: 'ID_CREATE_CONTACT', 2019: 'ID_MAKE_ATTACHMENT', 2020: 'ID_CREATE_CASE', 2021: 'IDC_BUT_SET_SERVER_PORT', 2022: 'IDD_SERVER_PORT_DIALOG', 2023: 'IDC_CHKBX', 1000: 'IDC_PROGRESS', 1001: 'IDC_PROGRESS_TEXT', 1002: 'IDC_STATIC_HAM', 1003: 'IDC_STATIC_SPAM', 1004: 'IDC_BROWSE_HAM', 1005: 'IDC_BROWSE_SPAM', 1006: 'IDC_START', 1007: 'IDC_BUT_REBUILD', 1008: 'IDC_BUT_RESCORE', 1009: 'IDC_VERSION', 1010: 'IDC_BUT_TRAIN_FROM_SPAM_FOLDER', 1011: 'IDC_BUT_TRAIN_TO_SPAM_FOLDER', 1012: 'IDC_BUT_TRAIN_NOW', 1013: 'IDC_BUT_FILTER_ENABLE', 1014: 'IDC_FILTER_STATUS', 2045: 'IDET_PARTNER_NAME', 1016: 'IDC_BUT_FILTER_DEFINE', 1017: 'IDC_BUT_ABOUT', 1018: 'IDC_BUT_ACT_SCORE', 1019: 'IDC_BUT_ACT_ALL', 1020: 'IDC_BUT_UNREAD', 1021: 'IDC_BUT_UNSEEN', -1: 'IDC_STATIC', 1023: 'IDC_SLIDER_CERTAIN'} bitmaps = {'IDB_OPENERPLOGO': 'OpenERP_Logo.bmp'} def ParseDialogs(s): return FakeParser() diff --git a/addons/outlook/plugin/openerp-outlook-plugin/dialogs/resources/dialogs.rc b/addons/outlook/plugin/openerp-outlook-plugin/dialogs/resources/dialogs.rc index fb060ecdab3..62e8b26ca4a 100755 --- a/addons/outlook/plugin/openerp-outlook-plugin/dialogs/resources/dialogs.rc +++ b/addons/outlook/plugin/openerp-outlook-plugin/dialogs/resources/dialogs.rc @@ -57,6 +57,12 @@ BEGIN LTEXT "Password : ",IDC_STATIC,30,90,100,17 EDITTEXT ID_PASSWORD,85,90,154,12,ES_AUTOHSCROLL | WS_VISIBLE | WS_TABSTOP | ES_PASSWORD PUSHBUTTON "Connect",ID_BUT_TESTCONNECTION,179,110,60,13, WS_VISIBLE | WS_TABSTOP + + GROUPBOX "WebServer Parameters",IDC_STATIC_GROUP, 270, 10,150,130 + LTEXT "Server : ",IDC_STATIC, 280, 30, 50, 15 + EDITTEXT IDET_WED_SERVER,310, 29, 90, 12,ES_AUTOHSCROLL | ES_READONLY + PUSHBUTTON "Change",ID_SET_WEB_CONNECTION, 295, 50, 50, 12 , WS_VISIBLE | WS_TABSTOP + PUSHBUTTON "Connect",IDPB_WEB_CONNECTION, 350, 50, 50, 12 , WS_VISIBLE | WS_TABSTOP END IDD_OBJECT_SETTINGS DIALOGEX 0, 0, 430, 210 @@ -131,7 +137,7 @@ BEGIN PUSHBUTTON "Close",IDCANCEL,385,300,60,14,WS_TABSTOP END -IDD_NEW_CONTACT_DIALOG DIALOGEX 0, 0, 350, 150 +IDD_NEW_CONTACT_DIALOG DIALOGEX 0, 0, 350, 180 STYLE DS_SETFONT | WS_POPUP | WS_CAPTION | WS_SYSMENU EXSTYLE WS_EX_CONTEXTHELP CAPTION "Create a New Contact" @@ -139,10 +145,11 @@ FONT 8, "Tahoma", 1000, 0, 0x0 BEGIN LTEXT "Select Partner : ",IDC_STATIC,13,20,50,17 - EDITTEXT ID_PARTNER_TEXT, 70, 18, 200, 12 , ES_AUTOHSCROLL |ES_READONLY - PUSHBUTTON "Search Partner",ID_NEW_PARTNER_BUTTON,280,17,60,14, WS_TABSTOP + EDITTEXT ID_PARTNER_TEXT, 70, 18, 150, 12 , ES_AUTOHSCROLL |ES_READONLY + PUSHBUTTON "Search Partner",ID_NEW_PARTNER_BUTTON,225,17,60,14, WS_TABSTOP + PUSHBUTTON "New Partner",IDPB_NEW_PARTNER_BUTTON,290, 17, 50, 14, WS_TABSTOP - GROUPBOX "Postal Address ", IDC_STATIC_GROUP,10,35,175,90 + GROUPBOX "Postal Address ", IDC_STATIC_GROUP,10,35,175,123 LTEXT "Contact Name : ",IDC_STATIC, 18, 53, 100, 17 EDITTEXT ID_CONTACT_NAME_TEXT, 76, 52, 100, 12, ES_AUTOHSCROLL | WS_TABSTOP LTEXT "Street : ",IDC_STATIC, 18, 67, 40, 17 @@ -153,9 +160,15 @@ BEGIN EDITTEXT ID_ZIP_TEXT,76, 93, 100, 12,ES_AUTOHSCROLL | WS_TABSTOP LTEXT "City : ",IDC_STATIC, 18,106, 50, 17 EDITTEXT ID_PARTNER_CITY_TEXT,76,107,100,12,ES_AUTOHSCROLL | WS_TABSTOP + LTEXT "Fed. State : ",IDC_STATIC,18,121,50,17 + EDITTEXT IDET_NC_PARTNER_STATE, 76, 122, 54, 12,ES_AUTOHSCROLL |ES_READONLY + PUSHBUTTON "Search", IDPB_NC_SEARCH_STATE1 ,135, 121, 40, 12, WS_TABSTOP + LTEXT "Country :",IDC_STATIC, 18, 134, 35, 17 + EDITTEXT IDET_NC_PARTNER_COUNTRY, 76, 135, 54, 12,ES_AUTOHSCROLL |ES_READONLY + PUSHBUTTON "Search", IDPB_NC_SEARCH_COUNTRY1, 135, 136, 40, 12, WS_TABSTOP - GROUPBOX "Communication ", IDC_STATIC_GROUP, 188, 35, 150, 90 + GROUPBOX "Communication ", IDC_STATIC_GROUP, 188, 35, 150, 123 LTEXT "Office : ",IDC_STATIC,194, 53, 30, 17 EDITTEXT ID_CONTACT_OFFICE_TEXT, 224, 52, 100, 12,ES_AUTOHSCROLL | WS_TABSTOP LTEXT "Mobile : ",IDC_STATIC,194, 67, 30, 17 @@ -165,8 +178,8 @@ BEGIN LTEXT "Email : ",IDC_STATIC, 194, 95, 30, 17 EDITTEXT ID_CONTACT_EMAIL_TEXT, 224, 94, 100, 12,ES_AUTOHSCROLL | WS_TABSTOP - PUSHBUTTON "Cancel",IDCANCEL,290,130,45,14, WS_TABSTOP - PUSHBUTTON "Save",ID_CONTACT_SAVE_BUTTON,240,130,45,14, WS_TABSTOP + PUSHBUTTON "Cancel",IDCANCEL,290,162,45,13, WS_TABSTOP + PUSHBUTTON "Save",ID_CONTACT_SAVE_BUTTON,240,162,45,13, WS_TABSTOP END IDD_NEW_PARTNER_DIALOG DIALOGEX 0, 0, 140,40 @@ -192,8 +205,9 @@ BEGIN PUSHBUTTON "Search Contact ",IDPB_SEARCH_PARTNER,280,15,60,14,WS_TABSTOP LTEXT "Partner Name : ",IDC_STATIC,13,42,50,17 - EDITTEXT IDET_PARTNER,70, 42, 200, 12,ES_AUTOHSCROLL |ES_READONLY - PUSHBUTTON "Search Partner",ID_NEW_PART_BUTTON,280,41,60,14, WS_TABSTOP + EDITTEXT IDET_PARTNER,70, 42, 150, 12,ES_AUTOHSCROLL |ES_READONLY + PUSHBUTTON "Search Partner",ID_NEW_PART_BUTTON,225,41,60,14, WS_TABSTOP + PUSHBUTTON "New Partner",IDPB_NEW_PART_BUTTON,290,41,50,14, WS_TABSTOP GROUPBOX "Postal Address ", IDC_STATIC_GROUP,10,65,175,125 LTEXT "Contact Name : ",IDC_STATIC,18,83,50,17 @@ -206,10 +220,14 @@ BEGIN EDITTEXT IDET_ZIP, 76, 125, 100, 12 , ES_AUTOHSCROLL | WS_TABSTOP LTEXT "City : ",IDC_STATIC,18,140,50,17 EDITTEXT IDET_PARTNER_CITY,76,139,100,12,ES_AUTOHSCROLL | WS_TABSTOP + LTEXT "Fed. State : ",IDC_STATIC,18,154,50,17 - EDITTEXT IDET_PARTNER_STATE, 76, 153, 100, 12,ES_AUTOHSCROLL |ES_READONLY + EDITTEXT IDET_PARTNER_STATE, 76, 153, 54, 12,ES_AUTOHSCROLL |ES_READONLY + PUSHBUTTON "Search", IDPB_SEARCH_STATE1 ,135, 153, 40, 12, WS_TABSTOP + LTEXT "Country :",IDC_STATIC, 18, 169, 35, 17 - EDITTEXT IDET_PARTNER_COUNTRY, 76, 168, 100, 12,ES_AUTOHSCROLL |ES_READONLY + EDITTEXT IDET_PARTNER_COUNTRY, 76, 168, 54, 12,ES_AUTOHSCROLL |ES_READONLY + PUSHBUTTON "Search", IDPB_SEARCH_COUNTRY1, 135, 168, 40, 12, WS_TABSTOP GROUPBOX "Communication ", IDC_STATIC_GROUP, 188, 65, 152, 125 LTEXT "Phone : ",IDC_STATIC, 194, 83, 30, 17 @@ -240,7 +258,75 @@ BEGIN CONTROL "List1",IDC_LIST_PARTNER,"SysListView32",WS_CHILD | WS_VISIBLE | WS_BORDER | WS_HSCROLL | WS_VSCROLL | LVS_SHOWSELALWAYS | LVS_EX_GRIDLINES | LVS_REPORT | LVS_EX_FULLROWSELECT, 8,40,200,185 PUSHBUTTON "Create New Partner", IDPB_CREATE_NEW_PARTNER, 10, 230, 100, 14, WS_TABSTOP - PUSHBUTTON "Select", IDPB_SELECT_PARTNER, 130, 230, 40, 14, WS_TABSTOP - PUSHBUTTON "Cancel", IDCANCEL, 175, 230, 40, 14, WS_TABSTOP + PUSHBUTTON "Select", IDPB_SELECT_PARTNER, 170, 230, 40, 14, WS_TABSTOP +END + +IDD_OPEN_PARTNER_DIALOG DIALOGEX 0, 0, 200,65 +STYLE DS_SETFONT | WS_POPUP | WS_CAPTION | WS_SYSMENU +EXSTYLE WS_EX_CONTEXTHELP +CAPTION "Open Partner" +FONT 8, "Tahoma", 400, 0, 0x0 +BEGIN + LTEXT "Link to Partner : (If this link does not opens directly in web browser then copy an the link and paste in web browser.) ",IDC_STATIC,5,3,190,25 + EDITTEXT IDET_PARTNER_LINK_TEXT,5,31,190,12,ES_AUTOHSCROLL | WS_TABSTOP + PUSHBUTTON "Ok",IDCANCEL,150,45,45,13,WS_TABSTOP + +END + +IDD_OPEN_DOCUEMNT_DIALOG DIALOGEX 0, 0, 200,65 +STYLE DS_SETFONT | WS_POPUP | WS_CAPTION | WS_SYSMENU +EXSTYLE WS_EX_CONTEXTHELP +CAPTION "Open Document" +FONT 8, "Tahoma", 400, 0, 0x0 +BEGIN + LTEXT "Link to Document : (If this link does not opens directly in web browser then copy an the link and paste in web browser.) ",IDC_STATIC,5,3,190,25 + EDITTEXT IDEB_OPENDOC_LINK_TEXT,5,31,190,12,ES_AUTOHSCROLL | WS_TABSTOP + PUSHBUTTON "Ok",IDCANCEL,150,45,45,14,WS_TABSTOP +END + +IDD_WEB_SERVER_PORT_DIALOG DIALOGEX 0, 0, 160, 55 +STYLE DS_SETFONT | WS_POPUP | WS_CAPTION | WS_SYSMENU +EXSTYLE WS_EX_CONTEXTHELP +CAPTION "OpenERP Connection" +FONT 8, "Tahoma", 400, 0, 0x0 +BEGIN + LTEXT "Server : ",IDC_STATIC,5,3,150,17 + EDITTEXT IDET_WEB_SERVER,40,3,100,12,ES_AUTOHSCROLL | WS_TABSTOP + LTEXT "Port : ",IDC_STATIC,5,18,100,17 + EDITTEXT IDET_WEB_PORT,40,18,100,12,ES_AUTOHSCROLL | WS_TABSTOP + PUSHBUTTON "Close",IDCANCEL,110,35,45,14,WS_TABSTOP + DEFPUSHBUTTON "OK",ID_WEB_OK,60,35,45,14,WS_TABSTOP +END + +IDD_SELECT_COUNTRY DIALOGEX 0, 0, 220, 250 +STYLE DS_SETFONT | WS_POPUP | WS_CAPTION | WS_SYSMENU +EXSTYLE WS_EX_CONTEXTHELP +CAPTION "Search Country" +FONT 8, "Tahoma", 400, 0, 0x0 +BEGIN + + LTEXT "Enter Name : ",IDC_STATIC,8,12,80,17 + EDITTEXT IDET_COUNTRY_SEARCH_NAME, 55, 10, 100, 12, ES_AUTOHSCROLL | WS_TABSTOP + PUSHBUTTON "Search", IDPB_SEARCH_COUNTRY, 160, 10, 50, 14, WS_TABSTOP + + CONTROL "List1",IDC_LIST_COUNTRY,"SysListView32",WS_CHILD | WS_VISIBLE | WS_BORDER | WS_HSCROLL | WS_VSCROLL | + LVS_SHOWSELALWAYS | LVS_EX_GRIDLINES | LVS_REPORT | LVS_EX_FULLROWSELECT, 8,40,200,185 + PUSHBUTTON "Select", IDPB_SELECT_COUNTRY, 170, 230, 40, 14, WS_TABSTOP +END + +IDD_SELECT_STATE DIALOGEX 0, 0, 220, 250 +STYLE DS_SETFONT | WS_POPUP | WS_CAPTION | WS_SYSMENU +EXSTYLE WS_EX_CONTEXTHELP +CAPTION "Search Country" +FONT 8, "Tahoma", 400, 0, 0x0 +BEGIN + + LTEXT "Enter Name : ",IDC_STATIC,8,12,80,17 + EDITTEXT IDET_STATE_SEARCH_NAME, 55, 10, 100, 12, ES_AUTOHSCROLL | WS_TABSTOP + PUSHBUTTON "Search", IDPB_STATE_SEARCH, 160, 10, 50, 14, WS_TABSTOP + + CONTROL "List1",IDC_LIST_STATE,"SysListView32",WS_CHILD | WS_VISIBLE | WS_BORDER | WS_HSCROLL | WS_VSCROLL | + LVS_SHOWSELALWAYS | LVS_EX_GRIDLINES | LVS_REPORT | LVS_EX_FULLROWSELECT, 8,40,200,185 + PUSHBUTTON "Select", IDPB_SELECT_STATE, 170, 230, 40, 14, WS_TABSTOP END diff --git a/addons/outlook/plugin/openerp-outlook-plugin/eml.py b/addons/outlook/plugin/openerp-outlook-plugin/eml.py index e18b7c5414d..ded81a16c6d 100755 --- a/addons/outlook/plugin/openerp-outlook-plugin/eml.py +++ b/addons/outlook/plugin/openerp-outlook-plugin/eml.py @@ -26,7 +26,8 @@ import chilkat import os from manager import ustr import win32ui -email = chilkat.CkEmail() +import email +cemail = chilkat.CkEmail() dt = chilkat.SYSTEMTIME() def generateEML(mail): sub = (mail.Subject).replace(' ','') @@ -36,20 +37,21 @@ def generateEML(mail): sender_name = mail.SenderEmailAddress attachments=mail.Attachments - email = chilkat.CkEmail() - email.put_Subject (ustr(sub).encode('iso-8859-1')) - email.put_Body (ustr(body).encode('utf-8')) - email.put_FromAddress (ustr(sender_email).encode('iso-8859-1')) - email.put_From (ustr(sender_email).encode('iso-8859-1')) + cemail = chilkat.CkEmail() + cemail.put_Subject (ustr(sub).encode('iso-8859-1')) + cemail.put_Body (ustr(body).encode('utf-8')) + cemail.put_FromAddress (ustr(sender_email).encode('iso-8859-1')) + cemail.put_From (ustr(sender_email).encode('iso-8859-1')) for i in xrange(1, recipients.Count+1): name = ustr(recipients.Item(i).Name).encode('iso-8859-1') address = ustr(recipients.Item(i).Address).encode('iso-8859-1') - email.AddTo(name,address) + cemail.AddTo(name,address) eml_name= ustr(sub).encode('iso-8859-1')+'-'+str(mail.EntryID)[-9:] ls = ['*', '/', '\\', '<', '>', ':', '?', '"', '|', '\t', '\n'] - mails_folder_path = os.path.abspath(os.path.dirname(__file__)+"\\dialogs\\resources\\mails\\") + #mails_folder_path = os.path.abspath("%temp%\\dialogs\\resources\\mails\\") + mails_folder_path = os.path.abspath("C:\\printing") attachments_folder_path = mails_folder_path + "\\attachments\\" if not os.path.exists(attachments_folder_path): os.makedirs(attachments_folder_path) @@ -70,7 +72,7 @@ def generateEML(mail): os.remove(att_file) f1 = att_file attachments[i].SaveAsFile(att_file) - contentType = email.addFileAttachment(att_file) + contentType = cemail.addFileAttachment(att_file) if (contentType == None ): print mail.lastErrorText() sys.exit() @@ -85,9 +87,11 @@ def generateEML(mail): f = eml_name.split('-') eml_name = f[0][0:l] + '.' + f[-1] eml_path = ustr(os.path.join(mails_folder_path,eml_name+".eml")).encode('iso-8859-1') - success = email.SaveEml(eml_path) + success = cemail.SaveEml(eml_path) + fp = open(eml_path, 'rb') + new_mail = email.message_from_file(fp) + fp.close() if (success == False): - print email.lastErrorText() + print cemail.lastErrorText() sys.exit() - - return eml_path \ No newline at end of file + return new_mail diff --git a/addons/outlook/plugin/openerp-outlook-plugin/tiny_xmlrpc.py b/addons/outlook/plugin/openerp-outlook-plugin/tiny_xmlrpc.py index 45fdeaa5d82..ef4b5606ac4 100755 --- a/addons/outlook/plugin/openerp-outlook-plugin/tiny_xmlrpc.py +++ b/addons/outlook/plugin/openerp-outlook-plugin/tiny_xmlrpc.py @@ -58,7 +58,8 @@ class XMLRpcConn(object): _public_methods_ = ['GetDBList', 'login', 'GetAllObjects', 'GetObjList', 'InsertObj', 'DeleteObject', 'GetCSList', \ 'ArchiveToOpenERP', 'IsCRMInstalled', 'GetPartners', 'GetObjectItems', \ 'CreateCase', 'MakeAttachment', 'CreateContact', 'CreatePartner', 'getitem', 'setitem', \ - 'SearchPartnerDetail', 'WritePartnerValues', 'GetAllState', 'GetAllCountry' ] + 'SearchPartnerDetail', 'WritePartnerValues', 'GetAllState', 'GetAllCountry', 'SearchPartner', 'SearchEmailResources', \ + 'GetCountry', 'GetStates', 'FindCountryForState'] _reg_clsctx_ = pythoncom.CLSCTX_INPROC_SERVER _reg_clsid_ = "{C6399AFD-763A-400F-8191-7F9D0503CAE2}" _reg_progid_ = "Python.OpenERP.XMLRpcConn" @@ -136,19 +137,8 @@ class XMLRpcConn(object): conn = xmlrpclib.ServerProxy(self._uri + '/xmlrpc/object') import eml new_msg = files = ext_msg ="" - eml_path=eml.generateEML(mail) - att_name = ustr(eml_path.split('\\')[-1]) - flag=False + new_mail=eml.generateEML(mail) attachments=mail.Attachments - - try: - fp = open(eml_path, 'rb') - msg =fp.read() - fp.close() - new_mail = email.message_from_string(str(msg)) - except Exception,e: - win32ui.MessageBox(str(e),"Reading Error Mail") - for rec in recs: #[('res.partner', 3, 'Agrolait')] model = rec[0] res_id = rec[1] @@ -184,10 +174,8 @@ class XMLRpcConn(object): result = {} if attachments: result = self.MakeAttachment([rec], mail) - attachment_ids = result.get(model, {}).get(res_id, []) ids = execute(conn,'execute',self._dbname,int(self._uid),self._pwd,'email.server.tools','history',model, res_id, msg, attachment_ids) - new_msg += """- {0} : {1}\n""".format(object_name,str(rec[2])) flag = True @@ -250,27 +238,30 @@ class XMLRpcConn(object): return res def CreateCase(self, section, mail, partner_ids, with_attachments=True): - res={} import win32ui import eml section=str(section) - partner_ids=eval(str(partner_ids)) - conn = xmlrpclib.ServerProxy(self._uri+ '/xmlrpc/object') + flag = False + id = -1 try: - eml_path=eml.generateEML(mail) - fp = open(eml_path, 'rb') - msg =fp.read() - fp.close() - new_mail = email.message_from_string(str(msg)) + conn = xmlrpclib.ServerProxy(self._uri+ '/xmlrpc/object') + email=eml.generateEML(mail) + id = execute(conn,'execute',self._dbname,int(self._uid),self._pwd,'email.server.tools','process_email',section, email) + if id > 0: + flag = True + return flag + else: + flag = False + return flag except Exception,e: - win32ui.MessageBox(str(e),"Mail Reading Error") - execute(conn,'execute',self._dbname,int(self._uid),self._pwd,'email.server.tools','process_email',section, str(new_mail)) + win32ui.MessageBox("Create Case\n"+str(e),"Mail Reading Error") + return flag def MakeAttachment(self, recs, mail): attachments = mail.Attachments result = {} conn = xmlrpclib.ServerProxy(self._uri+ '/xmlrpc/object') - att_folder_path = os.path.abspath(os.path.dirname(__file__)+"\\dialogs\\resources\\mails\\attachments\\") + att_folder_path = os.path.abspath(os.path.dirname("%temp%\\")) if not os.path.exists(att_folder_path): os.makedirs(att_folder_path) for rec in recs: #[('res.partner', 3, 'Agrolait')] @@ -303,12 +294,19 @@ class XMLRpcConn(object): return result def CreateContact(self, res=None): - import win32ui res=eval(str(res)) partner = res['partner_id'] + state = res['state_id'] + country = res['country_id'] conn = xmlrpclib.ServerProxy(self._uri+ '/xmlrpc/object') partner_id = execute( conn, 'execute', self._dbname, int(self._uid), self._pwd, 'res.partner', 'search', [('name','=',ustr(partner))]) res.update({'partner_id' : partner_id[0]}) + if not state == "": + country_id = execute( conn, 'execute', self._dbname, int(self._uid), self._pwd, 'res.country', 'search', [('name','=',ustr(country))]) + res.update({'country_id' : country_id[0]}) + if not country == "": + state_id = execute( conn, 'execute', self._dbname, int(self._uid), self._pwd, 'res.country.state', 'search', [('name','=',ustr(state))]) + res.update({'state_id' : state_id[0]}) id = execute(conn,'execute',self._dbname,int(self._uid),self._pwd,'res.partner.address','create',res) return id @@ -340,10 +338,14 @@ class XMLRpcConn(object): new_dict = dict(new_vals) email=new_dict['email'] partner = new_dict['partner'] + country_val = new_dict['country'] + state_val = new_dict['state'] conn = xmlrpclib.ServerProxy(self._uri+ '/xmlrpc/object') partner_id = execute( conn, 'execute', self._dbname, int(self._uid), self._pwd, 'res.partner', 'search', [('name','=',ustr(partner))]) + country_id = execute( conn, 'execute', self._dbname, int(self._uid), self._pwd, 'res.country', 'search', [('name','=',ustr(country_val))]) + state_id = execute( conn, 'execute', self._dbname, int(self._uid), self._pwd, 'res.country.state', 'search', [('name','=',ustr(state_val))]) address_id = execute( conn, 'execute', self._dbname, int(self._uid), self._pwd, 'res.partner.address', 'search', [('email','=',ustr(email))]) - if not address_id: + if not partner_id or not address_id or not country_id or not state_id: return flag address = execute( conn, 'execute', self._dbname, int(self._uid), self._pwd, 'res.partner.address','read',address_id[0],['id','partner_id','state_id','country_id']) vals_res_address={ @@ -356,6 +358,8 @@ class XMLRpcConn(object): 'mobile' : new_dict['mobile'], 'fax' : new_dict['fax'], 'zip' : new_dict['zip'], + 'country_id' : country_id[0], + 'state_id' : state_id[0] } temp = execute( conn, 'execute', self._dbname, int(self._uid), self._pwd, 'res.partner.address', 'write', address_id, vals_res_address) if temp: @@ -385,3 +389,72 @@ class XMLRpcConn(object): obj = execute( conn, 'execute', self._dbname, int(self._uid), self._pwd, 'res.country','read', [country_id], ['id','name'])[0] country_list.append((obj['id'], ustr(obj['name']))) return country_list + + def SearchPartner(self, partner = ""): + import win32ui + conn = xmlrpclib.ServerProxy(self._uri+ '/xmlrpc/object') + partner_id = execute( conn, 'execute', self._dbname, int(self._uid), self._pwd, 'res.partner', 'search', [('name','=',ustr(partner))]) + if not partner_id: + return None + return partner_id[0] + + def SearchEmailResources(self, mail): + import win32ui + import eml + + conn = xmlrpclib.ServerProxy(self._uri+ '/xmlrpc/object') + sub = "" + res_vals = [] + + try: +# new_mail = eml.generateEML(mail) + email.SaveAs() + message_id = str(new_mail.get('message-id')) + except Exception,e: + win32ui.MessageBox(str(e),"Mail Reading Error") + return None + mail_id = execute( conn, 'execute', self._dbname, int(self._uid), self._pwd, 'mailgate.message', 'search', [('message_id','=',message_id)]) + if not mail_id: + return None + address = execute( conn, 'execute', self._dbname, int(self._uid), self._pwd, 'mailgate.message','read',mail_id[0],['model','res_id']) + for key, vals in address.items(): + res_vals.append([key,vals]) + return res_vals + + + def GetCountry(self, country_search=''): + import win32ui + conn = xmlrpclib.ServerProxy(self._uri+ '/xmlrpc/object') + ids=[] + obj_list=[] + ids = execute(conn,'execute',self._dbname,int(self._uid),self._pwd,'res.country','search',[('name','ilike',ustr(country_search))]) + if ids: + ids.sort() + for id in ids: + object = execute(conn,'execute',self._dbname,int(self._uid),self._pwd,'res.country','read',[id],['id','name'])[0] + obj_list.append((object['id'], ustr(object['name']))) + obj_list.sort(lambda x, y: cmp(x[1],y[1])) + return obj_list + + def GetStates(self, state_search=''): + conn = xmlrpclib.ServerProxy(self._uri+ '/xmlrpc/object') + ids=[] + obj_list=[] + ids = execute(conn,'execute',self._dbname,int(self._uid),self._pwd,'res.country.state','search',[('name','ilike',ustr(state_search))]) + if ids: + ids.sort() + for id in ids: + object = execute(conn,'execute',self._dbname,int(self._uid),self._pwd,'res.country.state','read',[id],['id','name'])[0] + obj_list.append((object['id'], ustr(object['name']))) + obj_list.sort(lambda x, y: cmp(x[1],y[1])) + return obj_list + def FindCountryForState(self, state_search=''): + import win32ui + res_vals = [] + conn = xmlrpclib.ServerProxy(self._uri+ '/xmlrpc/object') + ids = execute(conn,'execute',self._dbname,int(self._uid),self._pwd,'res.country.state','search',[('name','=',ustr(state_search))]) + if not ids: + return None + object = execute(conn,'execute',self._dbname,int(self._uid),self._pwd,'res.country.state','read',ids)[0] + country = object['country_id'][1] + return country