diff --git a/addons/outlook/plugin/openerp-outlook-plugin/Register-plugin.bat b/addons/outlook/plugin/openerp-outlook-plugin/Register-plugin.bat index 3df29246757..6e024b39d35 100644 --- a/addons/outlook/plugin/openerp-outlook-plugin/Register-plugin.bat +++ b/addons/outlook/plugin/openerp-outlook-plugin/Register-plugin.bat @@ -1 +1,2 @@ python addin.py +pause diff --git a/addons/outlook/plugin/openerp-outlook-plugin/Unregister-plugin.bat b/addons/outlook/plugin/openerp-outlook-plugin/Unregister-plugin.bat index 0d069126294..1fcc6a95563 100644 --- a/addons/outlook/plugin/openerp-outlook-plugin/Unregister-plugin.bat +++ b/addons/outlook/plugin/openerp-outlook-plugin/Unregister-plugin.bat @@ -1 +1,2 @@ python addin.py --unregister +pause 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 455f447af06..26f0bed01ce 100755 --- a/addons/outlook/plugin/openerp-outlook-plugin/dialogs/dialog_map.py +++ b/addons/outlook/plugin/openerp-outlook-plugin/dialogs/dialog_map.py @@ -162,7 +162,8 @@ hwndChk_list=[] global search_text search_text='search_text' - +global partner_ref +partner_ref = '' global name name='' global email @@ -774,13 +775,6 @@ def CreateContact(btnProcessor,*args): return partner = win32gui.GetDlgItemText(btnProcessor.window.hwnd, btnProcessor.other_ids[9]) - combo = win32gui.GetDlgItem(btnProcessor.window.hwnd, btnProcessor.other_ids[9]) - sel = win32gui.SendMessage(combo, win32con.CB_GETCURSEL) - - state_combo = win32gui.GetDlgItem(btnProcessor.window.hwnd, btnProcessor.other_ids[10]) - state_sel = win32gui.SendMessage(state_combo, win32con.CB_GETCURSEL) - coun_combo = win32gui.GetDlgItem(btnProcessor.window.hwnd, btnProcessor.other_ids[11]) - country_sel = win32gui.SendMessage(coun_combo, win32con.CB_GETCURSEL) name = win32gui.GetDlgItemText(btnProcessor.window.hwnd, btnProcessor.other_ids[0]) email = win32gui.GetDlgItemText(btnProcessor.window.hwnd, btnProcessor.other_ids[1]) office_no = win32gui.GetDlgItemText(btnProcessor.window.hwnd, btnProcessor.other_ids[2]) @@ -795,6 +789,7 @@ def CreateContact(btnProcessor,*args): return res = { + 'partner_id':ustr(partner), 'name':ustr(name), 'email':ustr(email), 'phone':ustr(office_no), @@ -806,37 +801,8 @@ def CreateContact(btnProcessor,*args): 'zip':ustr(zip) } - fs_id = c_id = -1 - if not state_sel == -1 : - try: - temp = NewConn.GetAllState() - i = -1 - for t in temp: - i+=1 - if i == state_sel: - fs_id = t[0] - break; - res ['state_id'] = fs_id - except Exception, e: - msg = getMessage(e) - win32ui.MessageBox(msg, "New Partner", flag_error) - pass - if not country_sel == -1 : - try: - temp = NewConn.GetAllCountry() - i = -1 - for t in temp: - i+=1 - if i == country_sel: - c_id = t[0] - break; - res ['country_id'] = c_id - except Exception, e: - msg = getMessage(e) - win32ui.MessageBox(msg, "Open Contact", flag_error) - pass try: - id = NewConn.CreateContact(sel, str(res)) + id = NewConn.CreateContact(str(res)) if not partner: msg="New contact created." else: @@ -848,9 +814,6 @@ def CreateContact(btnProcessor,*args): win32ui.MessageBox(msg, "Create Contact", flag_info) for i in range(0,9): win32gui.SetDlgItemText(btnProcessor.window.hwnd, btnProcessor.other_ids[i], '') - win32gui.SendMessage(combo, win32con.CB_SETCURSEL, -1 ) - win32gui.SendMessage(state_combo, win32con.CB_SETCURSEL, -1 ) - win32gui.SendMessage(coun_combo, win32con.CB_SETCURSEL, -1 ) win32gui.EndDialog(btnProcessor.window.hwnd, btnProcessor.id) def SetAllText(txtProcessor,*args): @@ -929,6 +892,8 @@ def SetDefaultContact(txtProcessor,*args): global name global email + global partner_ref + win32gui.SetDlgItemText(txtProcessor.window.hwnd, txtProcessor.other_ids[1],partner_ref) if txtProcessor.init_done: win32gui.SetDlgItemText(txtProcessor.window.hwnd, txtProcessor.control_id,name) win32gui.SetDlgItemText(txtProcessor.window.hwnd, txtProcessor.other_ids[0],email) @@ -941,12 +906,9 @@ def SetDefaultContact(txtProcessor,*args): except Exception,e: pass - fs_combo = win32gui.GetDlgItem(txtProcessor.window.hwnd, txtProcessor.other_ids[1]) - c_combo = win32gui.GetDlgItem(txtProcessor.window.hwnd, txtProcessor.other_ids[2]) - win32gui.SendMessage(fs_combo, win32con.CB_SETCURSEL, -1 ) - win32gui.SendMessage(c_combo, win32con.CB_SETCURSEL, -1 ) win32gui.SetDlgItemText(txtProcessor.window.hwnd, txtProcessor.control_id,name) win32gui.SetDlgItemText(txtProcessor.window.hwnd, txtProcessor.other_ids[0],email) + txtProcessor.init_done = True def setCheckList(groupProcessor,*args): @@ -1043,6 +1005,8 @@ def set_search_text(dialogProcessor,*args): def set_name_email(dialogProcessor,*args): global name global email + global partner_ref + win32gui.SetDlgItemText(txtProcessor.window.hwnd, txtProcessor.other_ids[2], ustr(partner_ref)) name = win32gui.GetDlgItemText(dialogProcessor.window.hwnd, dialogProcessor.other_ids[0]) email = win32gui.GetDlgItemText(dialogProcessor.window.hwnd, dialogProcessor.other_ids[1]) @@ -1051,6 +1015,8 @@ def GetDefaultEmail(txtProcessor,*args): from win32com.client import Dispatch import win32con b = check() + global partner_ref + win32gui.SetDlgItemText(txtProcessor.window.hwnd, txtProcessor.other_ids[0], ustr(partner_ref)) if not b: return #Acquiring control of the text box @@ -1070,96 +1036,67 @@ def GetDefaultEmail(txtProcessor,*args): win32ui.MessageBox("Error In reading email ID from Email ","Open Contact", flag_error) pass win32gui.SendMessage(search_partner_box, win32con.WM_SETTEXT, 0, search_partner_text) - - fs_combo = win32gui.GetDlgItem(txtProcessor.window.hwnd, txtProcessor.other_ids[10]) - c_combo = win32gui.GetDlgItem(txtProcessor.window.hwnd, txtProcessor.other_ids[11]) - partner_combo = win32gui.GetDlgItem(txtProcessor.window.hwnd, txtProcessor.other_ids[0]) + if search_partner_text.strip() == "": + search_partner_text = None + return vals = [] #Searching the res.partner.address for contact based on Sender Mail ID. vals = NewConn.SearchPartnerDetail(search_partner_text) #If no user Found. if vals == None: - for i in range(1,10): + for i in range(1,12): win32gui.SetDlgItemText(txtProcessor.window.hwnd, txtProcessor.other_ids[i], "") - win32gui.SendMessage(fs_combo, win32con.CB_SETCURSEL, -1 ) - win32gui.SendMessage(c_combo, win32con.CB_SETCURSEL, -1 ) - win32gui.SendMessage(partner_combo, win32con.CB_SETCURSEL, -1 ) win32ui.MessageBox("No matching records found for : "+str(search_partner)+".","Open Contact", flag_excl) return else: #If user Found than Setting the Value for the contact in fields. - for i in range(1,10): + for i in range(1,12): win32gui.SetDlgItemText(txtProcessor.window.hwnd, txtProcessor.other_ids[i], "") - win32gui.SendMessage(fs_combo, win32con.CB_SETCURSEL, -1 ) - win32gui.SendMessage(c_combo, win32con.CB_SETCURSEL, -1 ) - win32gui.SendMessage(partner_combo, win32con.CB_SETCURSEL, -1 ) for val in vals: - if val[0] == 'partner_id': - temp = list (NewConn.GetPartners()) - i = -1 - for t in temp: - i+=1 - if t[1] == val[1][1] : - win32gui.SendMessage(partner_combo, win32con.CB_SETCURSEL, i ) + win32gui.SetDlgItemText(txtProcessor.window.hwnd, txtProcessor.other_ids[0], ustr(val[1][1])) + if val[0] == 'name' and val[1] != False : - win32gui.SetDlgItemText(txtProcessor.window.hwnd, txtProcessor.other_ids[1], str(val[1])) + win32gui.SetDlgItemText(txtProcessor.window.hwnd, txtProcessor.other_ids[1], ustr(val[1])) if val[0] == 'street' and val[1] != False : - win32gui.SetDlgItemText(txtProcessor.window.hwnd, txtProcessor.other_ids[2], str(val[1])) + win32gui.SetDlgItemText(txtProcessor.window.hwnd, txtProcessor.other_ids[2], ustr(val[1])) if val[0] == 'street2' and val[1] != False : - win32gui.SetDlgItemText(txtProcessor.window.hwnd, txtProcessor.other_ids[3], str(val[1])) + win32gui.SetDlgItemText(txtProcessor.window.hwnd, txtProcessor.other_ids[3], ustr(val[1])) if val[0] == 'zip' and val[1] != False : - win32gui.SetDlgItemText(txtProcessor.window.hwnd, txtProcessor.other_ids[9], str(val[1])) + win32gui.SetDlgItemText(txtProcessor.window.hwnd, txtProcessor.other_ids[9], ustr(val[1])) if val[0] == 'city' and val[1] != False : - win32gui.SetDlgItemText(txtProcessor.window.hwnd, txtProcessor.other_ids[4], str(val[1])) + win32gui.SetDlgItemText(txtProcessor.window.hwnd, txtProcessor.other_ids[4], ustr(val[1])) if val[0] == 'state_id' and val[1] != False : - id = i = -1 - temp = list(NewConn.GetAllState()) - for t in temp: - i+=1 - if str(t[1]) == str(val[1][1]): - id = i - break; - sel = win32gui.SendMessage(fs_combo, win32con.CB_SETCURSEL, id ) + win32gui.SetDlgItemText(txtProcessor.window.hwnd, txtProcessor.other_ids[10], ustr(val[1][1])) if val[0] == 'country_id' and val[1] != False : - id = i = -1 - temp = list(NewConn.GetAllCountry()) - for t in temp: - i+=1 - if str(t[1]) == str(val[1][1]): - id = i - break; - sel = win32gui.SendMessage(c_combo, win32con.CB_SETCURSEL, id ) + win32gui.SetDlgItemText(txtProcessor.window.hwnd, txtProcessor.other_ids[11], ustr(val[1][1])) if val[0] == 'phone' and val[1] != False : - win32gui.SetDlgItemText(txtProcessor.window.hwnd, txtProcessor.other_ids[5], str(val[1])) + win32gui.SetDlgItemText(txtProcessor.window.hwnd, txtProcessor.other_ids[5], ustr(val[1])) if val[0] == 'mobile' and val[1] != False : - win32gui.SetDlgItemText(txtProcessor.window.hwnd, txtProcessor.other_ids[6], str(val[1])) + win32gui.SetDlgItemText(txtProcessor.window.hwnd, txtProcessor.other_ids[6], ustr(val[1])) if val[0] == 'fax' and val[1] != False : - win32gui.SetDlgItemText(txtProcessor.window.hwnd, txtProcessor.other_ids[7], str(val[1])) + win32gui.SetDlgItemText(txtProcessor.window.hwnd, txtProcessor.other_ids[7], ustr(val[1])) if val[0] == 'email' and val[1] != False : - win32gui.SetDlgItemText(txtProcessor.window.hwnd, txtProcessor.other_ids[8], str(val[1])) + win32gui.SetDlgItemText(txtProcessor.window.hwnd, txtProcessor.other_ids[8], ustr(val[1])) txtProcessor.init_done=True def SearchPartner(btnProcessor,*args): b = check() + global partner_ref if not b: return - #hwnd For the List box - fs_combo = win32gui.GetDlgItem(btnProcessor.window.hwnd, btnProcessor.other_ids[11]) - c_combo = win32gui.GetDlgItem(btnProcessor.window.hwnd, btnProcessor.other_ids[12]) - partner_combo = win32gui.GetDlgItem(btnProcessor.window.hwnd, btnProcessor.other_ids[1]) try : search_partner = win32gui.GetDlgItemText(btnProcessor.window.hwnd, btnProcessor.other_ids[0]) if not search_partner: @@ -1170,79 +1107,51 @@ def SearchPartner(btnProcessor,*args): vals = NewConn.SearchPartnerDetail(search_partner) #if contact not found resetting all field to blank if vals == None: - for i in range(2,11): + for i in range(1,13): win32gui.SetDlgItemText(btnProcessor.window.hwnd, btnProcessor.other_ids[i], "") - win32gui.SendMessage(fs_combo, win32con.CB_SETCURSEL, -1 ) - win32gui.SendMessage(c_combo, win32con.CB_SETCURSEL, -1 ) - win32gui.SendMessage(partner_combo, win32con.CB_SETCURSEL, -1 ) win32ui.MessageBox("No matching records found for : "+str(search_partner)+".","Open Contact", flag_excl) win32gui.SetDlgItemText(btnProcessor.window.hwnd, btnProcessor.other_ids[0], "") return #if contact found than setting the values for the contact. else: - for i in range(2,11): + for i in range(1,13): win32gui.SetDlgItemText(btnProcessor.window.hwnd, btnProcessor.other_ids[i], "") - win32gui.SendMessage(fs_combo, win32con.CB_SETCURSEL, -1 ) - win32gui.SendMessage(c_combo, win32con.CB_SETCURSEL, -1 ) - win32gui.SendMessage(partner_combo, win32con.CB_SETCURSEL, -1 ) for val in vals: if val[0] == 'partner_id': - #Finding the partner index in list and setting it. - temp = list (NewConn.GetPartners()) - i = -1 - for t in temp: - i+=1 - if t[1] == val[1][1] : - win32gui.SendMessage(partner_combo, win32con.CB_SETCURSEL, i ) + win32gui.SetDlgItemText(btnProcessor.window.hwnd, btnProcessor.other_ids[1], ustr(val[1][1])) if val[0] == 'name' and val[1] != False : - win32gui.SetDlgItemText(btnProcessor.window.hwnd, btnProcessor.other_ids[2], str(val[1])) + win32gui.SetDlgItemText(btnProcessor.window.hwnd, btnProcessor.other_ids[2], ustr(val[1])) if val[0] == 'street' and val[1] != False : - win32gui.SetDlgItemText(btnProcessor.window.hwnd, btnProcessor.other_ids[3], str(val[1])) + win32gui.SetDlgItemText(btnProcessor.window.hwnd, btnProcessor.other_ids[3], ustr(val[1])) if val[0] == 'street2' and val[1] != False : - win32gui.SetDlgItemText(btnProcessor.window.hwnd, btnProcessor.other_ids[4], str(val[1])) + win32gui.SetDlgItemText(btnProcessor.window.hwnd, btnProcessor.other_ids[4], ustr(val[1])) if val[0] == 'zip' and val[1] != False : - win32gui.SetDlgItemText(btnProcessor.window.hwnd, btnProcessor.other_ids[10], str(val[1])) + win32gui.SetDlgItemText(btnProcessor.window.hwnd, btnProcessor.other_ids[10], ustr(val[1])) if val[0] == 'city' and val[1] != False : - win32gui.SetDlgItemText(btnProcessor.window.hwnd, btnProcessor.other_ids[5], str(val[1])) + win32gui.SetDlgItemText(btnProcessor.window.hwnd, btnProcessor.other_ids[5], ustr(val[1])) if val[0] == 'state_id' and val[1] != False : - #Finding the state index in list and setting it. - id = i = -1 - temp = list(NewConn.GetAllState()) - for t in temp: - i+=1 - if str(t[1]) == str(val[1][1]): - id = i - break; - sel = win32gui.SendMessage(fs_combo, win32con.CB_SETCURSEL, id ) + win32gui.SetDlgItemText(btnProcessor.window.hwnd, btnProcessor.other_ids[11], ustr(val[1][1])) if val[0] == 'country_id' and val[1] != False : - #Finding the country index in list and setting it. - id = i = -1 - temp = list(NewConn.GetAllCountry()) - for t in temp: - i+=1 - if str(t[1]) == str(val[1][1]): - id = i - break; - sel = win32gui.SendMessage(c_combo, win32con.CB_SETCURSEL, id ) + win32gui.SetDlgItemText(btnProcessor.window.hwnd, btnProcessor.other_ids[12], ustr(val[1][1])) if val[0] == 'phone' and val[1] != False : - win32gui.SetDlgItemText(btnProcessor.window.hwnd, btnProcessor.other_ids[6], str(val[1])) + win32gui.SetDlgItemText(btnProcessor.window.hwnd, btnProcessor.other_ids[6], ustr(val[1])) if val[0] == 'mobile' and val[1] != False : - win32gui.SetDlgItemText(btnProcessor.window.hwnd, btnProcessor.other_ids[7], str(val[1])) + win32gui.SetDlgItemText(btnProcessor.window.hwnd, btnProcessor.other_ids[7], ustr(val[1])) if val[0] == 'fax' and val[1] != False : - win32gui.SetDlgItemText(btnProcessor.window.hwnd, btnProcessor.other_ids[8], str(val[1])) + win32gui.SetDlgItemText(btnProcessor.window.hwnd, btnProcessor.other_ids[8], ustr(val[1])) if val[0] == 'email' and val[1] != False : - win32gui.SetDlgItemText(btnProcessor.window.hwnd, btnProcessor.other_ids[9], str(val[1])) + win32gui.SetDlgItemText(btnProcessor.window.hwnd, btnProcessor.other_ids[9], ustr(val[1])) win32gui.SetDlgItemText(btnProcessor.window.hwnd, btnProcessor.other_ids[0], "") except Exception,e: @@ -1253,6 +1162,7 @@ def SearchPartner(btnProcessor,*args): def WritePartner(btnProcessor,*args): new_vals=[] #Reading new value of the fields. + partner = win32gui.GetDlgItemText(btnProcessor.window.hwnd, btnProcessor.other_ids[0]) contect_name = win32gui.GetDlgItemText(btnProcessor.window.hwnd, btnProcessor.other_ids[1]) street = win32gui.GetDlgItemText(btnProcessor.window.hwnd, btnProcessor.other_ids[2]) street2 = win32gui.GetDlgItemText(btnProcessor.window.hwnd, btnProcessor.other_ids[3]) @@ -1262,70 +1172,14 @@ def WritePartner(btnProcessor,*args): fax = win32gui.GetDlgItemText(btnProcessor.window.hwnd, btnProcessor.other_ids[9]) email = win32gui.GetDlgItemText(btnProcessor.window.hwnd, btnProcessor.other_ids[10]) zip = win32gui.GetDlgItemText(btnProcessor.window.hwnd, btnProcessor.other_ids[11]) - country_combo = win32gui.GetDlgItem(btnProcessor.window.hwnd, btnProcessor.other_ids[6]) - country_sel = win32gui.SendMessage(country_combo, win32con.CB_GETCURSEL) - state_combo = win32gui.GetDlgItem(btnProcessor.window.hwnd, btnProcessor.other_ids[5]) - state_sel = win32gui.SendMessage(state_combo, win32con.CB_GETCURSEL) - partner_combo = win32gui.GetDlgItem(btnProcessor.window.hwnd, btnProcessor.other_ids[0]) - partner_sel = win32gui.SendMessage(partner_combo, win32con.CB_GETCURSEL) - #Checking that record not being saved without name or Partner if contect_name.strip() == "": win32ui.MessageBox("Please enter partner Contact Name name.", "Open Contact", flag_excl) return - if partner_sel < 1: - win32ui.MessageBox("Please Select Partner From list.", "Open Contact", flag_excl) - return - fs_id = c_id = p_id = -1 - #Finding the partner index in list finding it record ID. - if not partner_sel < 0 : - try: - temp = NewConn.GetPartners() - i = -1 - for t in temp: - i+=1 - if i == partner_sel: - p_id = t[0] - break; - except Exception, e: - msg = getMessage(e) - win32ui.MessageBox(msg, "Open Contact", flag_error) - pass - #Finding the State index in list finding it record ID. - if not state_sel == -1 : - try: - temp = NewConn.GetAllState() - i = -1 - for t in temp: - i+=1 - if i == state_sel: - fs_id = t[0] - break; - except Exception, e: - msg = getMessage(e) - win32ui.MessageBox(msg, "Open Contact", flag_error) - pass - #Finding the country index in list finding it record ID. - if not country_sel == -1 : - try: - temp = NewConn.GetAllCountry() - i = -1 - for t in temp: - i+=1 - if i == country_sel: - c_id = t[0] - break; - except Exception, e: - msg = getMessage(e) - win32ui.MessageBox(msg, "Open Contact", flag_error) - pass - # Creating a list to write the values to the OpenERP - new_vals.append(['partner_id',p_id]) + new_vals.append(['partner',partner]) new_vals.append(['name',contect_name]) new_vals.append(['street',street]) new_vals.append(['street2',street2]) new_vals.append(['city',city]) - new_vals.append(['state_id',fs_id]) - new_vals.append(['country_id',c_id]) new_vals.append(['phone',phone]) new_vals.append(['mobile',mobile]) new_vals.append(['email',email]) @@ -1346,6 +1200,80 @@ def WritePartner(btnProcessor,*args): elif flag == -1: win32ui.MessageBox("Contact can not be Save.\nFirst select contact using Search.","Open Contact", flag_info) +def SetPartnerNameColumn(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 = "Partner Name" + lvc.cx = 275 + win32gui.SendMessage(hwndList, commctrl.LVM_INSERTCOLUMN, 0, lvc.toparam()) + listProcessor.init_done = True + +def SelectPartnerFromList(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 partner_ref + if str(sel_text).strip() == "": + win32ui.MessageBox("Invalid Partner Selected.","Search Partner") + return + try: + partner_ref = str(sel_text) + except Exception,e: + pass + win32gui.EndDialog(btnProcessor.window.hwnd, btnProcessor.other_ids[1]) + return + elif sel_count < 1: + win32ui.MessageBox("You should Select atleast one partner.","Search Partner") + return + else: + win32ui.MessageBox("Multiple Selection is not allowded.","Search Partner") + return + +def SearchPartnerList(btnProcessor,*args): + b = check() + if not b: + return + try : + search_partner = win32gui.GetDlgItemText(btnProcessor.window.hwnd, btnProcessor.other_ids[0]) + if not search_partner: + win32ui.MessageBox("Please enter Partner name to search for.", "Search Partner", flag_excl) + return + #Searching the contact. + hwndList = win32gui.GetDlgItem(btnProcessor.window.hwnd, btnProcessor.other_ids[1]) + partners = list(NewConn.GetPartners(search_partner)) + win32gui.SendMessage(hwndList, commctrl.LVM_DELETEALLITEMS) + if not partners: + win32gui.SetDlgItemText(btnProcessor.window.hwnd, btnProcessor.other_ids[0],"") + win32ui.MessageBox("No Partner found with name {0}.".format(search_partner),"Search Partner",flag_error) + for partner in partners: + num_items = win32gui.SendMessage(hwndList, commctrl.LVM_GETITEMCOUNT) + item = LVITEM(text=partner[1],iItem = num_items) + win32gui.SendMessage(hwndList, commctrl.LVM_INSERTITEM, 0, item.toparam()) + except Exception,e: + msg = getMessage(e) + win32ui.MessageBox(msg, "Search Partner", flag_error) + pass dialog_map = { @@ -1399,13 +1327,10 @@ dialog_map = { ), "IDD_NEW_CONTACT_DIALOG" : ( - (PartnersComboProcessor, "ID_PARTNER_DROPDOWNLIST", GetConn, ()), - (CountryComboProcessor, "ID_COUNTRY_DROPLIST", GetConn, ()), - (StateComboProcessor, "ID_FED_STATE_DROPLIST", GetConn, ()), (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_DROPDOWNLIST ID_FED_STATE_DROPLIST ID_COUNTRY_DROPLIST", CreateContact, ()), - (TextProcessor, "ID_CONTACT_NAME_TEXT ID_CONTACT_EMAIL_TEXT ID_FED_STATE_DROPLIST ID_COUNTRY_DROPLIST" , SetDefaultContact, ()), - (DialogCommand, "ID_NEW_PARTNER_BUTTON ID_CONTACT_NAME_TEXT ID_CONTACT_EMAIL_TEXT", "IDD_NEW_PARTNER_DIALOG", set_name_email, ()), + (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_PARTNER_DIALOG" : ( @@ -1414,14 +1339,18 @@ dialog_map = { ), "IDD_VIEW_PARTNER_DIALOG" : ( - (PartnersComboProcessor, "ID_PARTNER_DROPLIST", GetConn, ()), - (StateComboProcessor, "ID_ALL_STATE_DROPDOWNLIST", GetConn, ()), - (CountryComboProcessor, "ID_ALL_COUNTRY_DROPDOWNLIST", GetConn, ()), - (TextProcessor, "IDET_SEARCH_PARTNER ID_PARTNER_DROPLIST 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 ID_ALL_STATE_DROPDOWNLIST ID_ALL_COUNTRY_DROPDOWNLIST", GetDefaultEmail, ()), - (CommandButtonProcessor, "IDPB_SEARCH_PARTNER IDET_SEARCH_PARTNER ID_PARTNER_DROPLIST 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 ID_ALL_STATE_DROPDOWNLIST ID_ALL_COUNTRY_DROPDOWNLIST", SearchPartner, ()), - (CommandButtonProcessor, "IDPB_WRITE_CHANGES ID_PARTNER_DROPLIST IDET_PARTNER_CONTACT_NAME IDET_PARTNER_STREET IDET_PARTNER_STREET2 IDET_PARTNER_CITY ID_ALL_STATE_DROPDOWNLIST ID_ALL_COUNTRY_DROPDOWNLIST IDET_PARTNER_OFFICENO IDET_PARTNER_MOBILENO IDET_PARTNER_EMAIL IDET_PARTNER_FAX IDET_ZIP", WritePartner, ()), + (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_NEW_PARTNER_DIALOG" ), + (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") + ), } 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 8979221b00f..bb028c0da90 100755 --- a/addons/outlook/plugin/openerp-outlook-plugin/dialogs/resources/dialogs.h +++ b/addons/outlook/plugin/openerp-outlook-plugin/dialogs/resources/dialogs.h @@ -156,6 +156,9 @@ #define IDPB_WRITE_CHANGES 2059 #define ID_ALL_STATE_DROPDOWNLIST 2060 #define ID_ALL_COUNTRY_DROPDOWNLIST 2061 +#define IDET_PARTNER_STATE 2062 +#define IDET_PARTNER_COUNTRY 2063 +#define IDET_PARTNER 2064 // #define ID_STREET_TEXT 2062 #define ID_STREET2_TEXT 2063 @@ -167,6 +170,13 @@ #define ID_PARTNER_DROPLIST 2069 #define ID_NEW_PART_BUTTON 2070 #define IDPB_NEWPARTNER_BUTTON 2071 +#define IDD_SELECT_PARTNER 2073 +#define IDC_LIST_PARTNER 2072 +#define IDPB_SELECT_PARTNER 2075 +#define IDET_PARTNER_SEARCH_NAME 2076 +#define IDPB_PARTNER_SEARCH 2077 +#define IDPB_CREATE_NEW_PARTNER 2078 +#define ID_PARTNER_TEXT 2079 // 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 81bf5d8b1e6..3dac98b5fb0 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_=11409 -_rc_mtime_=1285078254 +_rc_size_=11883 +_rc_mtime_=1285738756 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 Partner ', 2052, (280, 15, 60, 14), 1342242816], [130, 'Partner Name : ', -1, (13, 42, 50, 17), 1342177280], [133, '', 2069, (70, 42, 200, 80), 1344339971], [128, 'New 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], [133, '', 2060, (76, 153, 100, 50), 1344339971], [130, 'Country :', -1, (18, 169, 35, 17), 1342177280], [133, '', 2061, (76, 168, 100, 50), 1344339971], [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, 190), -1865940928, 1024, (8, 'Tahoma')], [130, 'Select Partner : ', -1, (13, 20, 50, 17), 1342177280], [133, '', 2032, (70, 18, 200, 80), 1344339971], [128, 'New Partner', 2033, (280, 17, 55, 14), 1342242816], [128, 'Postal Address ', 2024, (10, 35, 175, 125), 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, 108, 50, 17), 1342177280], [129, '', 2067, (76, 107, 100, 12), 1350631552], [130, 'Fed. State : ', -1, (18, 123, 40, 17), 1342177280], [133, '', 2064, (76, 122, 100, 80), 1344339971], [130, 'Country : ', -1, (18, 137, 40, 17), 1342177280], [133, '', 2065, (76, 136, 100, 80), 1344339971], [128, 'Communication ', 2024, (188, 35, 150, 125), 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, 170, 45, 14), 1342242816], [128, 'Save', 40009, (240, 170, 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_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': 2057, '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, '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, '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_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, '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, '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, '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, 'IDD_SYNC': 40002, '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, 'ID_STREET_TEXT': 2062, '_APS_NEXT_COMMAND_VALUE': 40001, 'IDET_SEARCH_PARTNER': 2051, 'ID_PORT': 2002, 'IDD_SERVER_PORT_DIALOG': 2022, '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', 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: 'ID_STREET_TEXT', 2063: 'ID_STREET2_TEXT', 2064: 'ID_FED_STATE_DROPLIST', 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', 2068: 'ID_ZIP_TEXT', 2051: 'IDET_SEARCH_PARTNER', 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_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'} 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 cc9844807c6..fb060ecdab3 100755 --- a/addons/outlook/plugin/openerp-outlook-plugin/dialogs/resources/dialogs.rc +++ b/addons/outlook/plugin/openerp-outlook-plugin/dialogs/resources/dialogs.rc @@ -111,7 +111,7 @@ EXSTYLE WS_EX_CONTEXTHELP CAPTION "Push to OpenERP" FONT 8, "Tahoma", 1000, 0, 0x0 BEGIN - GROUPBOX " Link to an Existing Documents ", IDC_STATIC_GROUP, 8,5,250,290,WS_TABSTOP + GROUPBOX "Link to an Existing Documents ", IDC_STATIC_GROUP, 8,5,250,290,WS_TABSTOP LTEXT "Search for : ",IDC_STATIC,15,17,40,12 EDITTEXT ID_SEARCH_TEXT,60,15,120,12,ES_AUTOHSCROLL | WS_TABSTOP// left top width height PUSHBUTTON "Search",ID_SEARCH,187,15,40,14,WS_TABSTOP @@ -131,7 +131,7 @@ BEGIN PUSHBUTTON "Close",IDCANCEL,385,300,60,14,WS_TABSTOP END -IDD_NEW_CONTACT_DIALOG DIALOGEX 0, 0, 350, 190 +IDD_NEW_CONTACT_DIALOG DIALOGEX 0, 0, 350, 150 STYLE DS_SETFONT | WS_POPUP | WS_CAPTION | WS_SYSMENU EXSTYLE WS_EX_CONTEXTHELP CAPTION "Create a New Contact" @@ -139,26 +139,23 @@ FONT 8, "Tahoma", 1000, 0, 0x0 BEGIN LTEXT "Select Partner : ",IDC_STATIC,13,20,50,17 - COMBOBOX ID_PARTNER_DROPDOWNLIST, 70, 18, 200, 80 ,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP - PUSHBUTTON "New Partner",ID_NEW_PARTNER_BUTTON,280,17,55,14, WS_TABSTOP + 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 - GROUPBOX "Postal Address ", IDC_STATIC_GROUP,10,35,175,125 + GROUPBOX "Postal Address ", IDC_STATIC_GROUP,10,35,175,90 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 EDITTEXT ID_STREET_TEXT, 76, 66, 100, 12, ES_AUTOHSCROLL | WS_TABSTOP LTEXT "Street2 : ",IDC_STATIC, 18, 81, 40, 17 EDITTEXT ID_STREET2_TEXT, 76, 80, 100, 12, ES_AUTOHSCROLL | WS_TABSTOP - LTEXT "Zip : ",IDC_STATIC,18, 94, 50, 17 + LTEXT "Zip : ",IDC_STATIC, 18, 94, 50, 17 EDITTEXT ID_ZIP_TEXT,76, 93, 100, 12,ES_AUTOHSCROLL | WS_TABSTOP - LTEXT "City : ",IDC_STATIC,18,108,50,17 + 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, 123, 40, 17 - COMBOBOX ID_FED_STATE_DROPLIST, 76, 122, 100, 80,CBS_DROPDOWNLIST |WS_VSCROLL | WS_TABSTOP - LTEXT "Country : ",IDC_STATIC, 18, 137, 40, 17 - COMBOBOX ID_COUNTRY_DROPLIST, 76, 136, 100, 80,CBS_DROPDOWNLIST |WS_VSCROLL | WS_TABSTOP - GROUPBOX "Communication ", IDC_STATIC_GROUP, 188, 35, 150, 125 + + GROUPBOX "Communication ", IDC_STATIC_GROUP, 188, 35, 150, 90 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 @@ -168,8 +165,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,170,45,14, WS_TABSTOP - PUSHBUTTON "Save",ID_CONTACT_SAVE_BUTTON,240,170,45,14, WS_TABSTOP + PUSHBUTTON "Cancel",IDCANCEL,290,130,45,14, WS_TABSTOP + PUSHBUTTON "Save",ID_CONTACT_SAVE_BUTTON,240,130,45,14, WS_TABSTOP END IDD_NEW_PARTNER_DIALOG DIALOGEX 0, 0, 140,40 @@ -192,11 +189,11 @@ FONT 8, "Tahoma", 400, 0, 0x0 BEGIN LTEXT "Email ID : ",IDC_STATIC,32,17,40,12 EDITTEXT IDET_SEARCH_PARTNER, 70, 15, 200, 12, ES_AUTOHSCROLL | WS_TABSTOP - PUSHBUTTON "Search Partner ",IDPB_SEARCH_PARTNER,280,15,60,14,WS_TABSTOP + PUSHBUTTON "Search Contact ",IDPB_SEARCH_PARTNER,280,15,60,14,WS_TABSTOP LTEXT "Partner Name : ",IDC_STATIC,13,42,50,17 - COMBOBOX ID_PARTNER_DROPLIST, 70, 42, 200, 80 ,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP - PUSHBUTTON "New Partner",ID_NEW_PART_BUTTON,280,41,60,14, WS_TABSTOP + EDITTEXT IDET_PARTNER,70, 42, 200, 12,ES_AUTOHSCROLL |ES_READONLY + PUSHBUTTON "Search Partner",ID_NEW_PART_BUTTON,280,41,60,14, WS_TABSTOP GROUPBOX "Postal Address ", IDC_STATIC_GROUP,10,65,175,125 LTEXT "Contact Name : ",IDC_STATIC,18,83,50,17 @@ -210,9 +207,9 @@ BEGIN 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 - COMBOBOX ID_ALL_STATE_DROPDOWNLIST, 76, 153, 100, 50,CBS_DROPDOWNLIST |WS_VSCROLL | WS_TABSTOP + EDITTEXT IDET_PARTNER_STATE, 76, 153, 100, 12,ES_AUTOHSCROLL |ES_READONLY LTEXT "Country :",IDC_STATIC, 18, 169, 35, 17 - COMBOBOX ID_ALL_COUNTRY_DROPDOWNLIST, 76, 168,100,50,CBS_DROPDOWNLIST |WS_VSCROLL | WS_TABSTOP + EDITTEXT IDET_PARTNER_COUNTRY, 76, 168, 100, 12,ES_AUTOHSCROLL |ES_READONLY GROUPBOX "Communication ", IDC_STATIC_GROUP, 188, 65, 152, 125 LTEXT "Phone : ",IDC_STATIC, 194, 83, 30, 17 @@ -228,3 +225,22 @@ BEGIN PUSHBUTTON "Save", IDPB_WRITE_CHANGES, 213, 195, 60, 14, WS_TABSTOP PUSHBUTTON "Cancel", IDCANCEL, 281, 195, 60, 14, WS_TABSTOP END + +IDD_SELECT_PARTNER DIALOGEX 0, 0, 220, 250 +STYLE DS_SETFONT | WS_POPUP | WS_CAPTION | WS_SYSMENU +EXSTYLE WS_EX_CONTEXTHELP +CAPTION "Search Partner" +FONT 8, "Tahoma", 400, 0, 0x0 +BEGIN + + LTEXT "Enter Name : ",IDC_STATIC,8,12,80,17 + EDITTEXT IDET_PARTNER_SEARCH_NAME, 55, 10, 100, 12, ES_AUTOHSCROLL | WS_TABSTOP + PUSHBUTTON "Search", IDPB_PARTNER_SEARCH, 160, 10, 50, 14, WS_TABSTOP + + 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 +END + diff --git a/addons/outlook/plugin/openerp-outlook-plugin/tiny_xmlrpc.py b/addons/outlook/plugin/openerp-outlook-plugin/tiny_xmlrpc.py index 9a3efc6fa7f..45fdeaa5d82 100755 --- a/addons/outlook/plugin/openerp-outlook-plugin/tiny_xmlrpc.py +++ b/addons/outlook/plugin/openerp-outlook-plugin/tiny_xmlrpc.py @@ -209,12 +209,12 @@ class XMLRpcConn(object): obj_list = [ustr(item['name']).encode('iso-8859-1') for item in objects] return obj_list - def GetPartners(self): + def GetPartners(self, search_partner=''): + import win32ui conn = xmlrpclib.ServerProxy(self._uri+ '/xmlrpc/object') ids=[] obj_list=[] - - ids = execute(conn,'execute',self._dbname,int(self._uid),self._pwd,'res.partner','search',[]) + ids = execute(conn,'execute',self._dbname,int(self._uid),self._pwd,'res.partner','search',[('name','ilike',ustr(search_partner))]) if ids: ids.sort() obj_list.append((-999, ustr(''))) @@ -302,13 +302,13 @@ class XMLRpcConn(object): result[obj].update({obj_id: attachment_ids}) return result - def CreateContact(self, sel=None, res=None): + def CreateContact(self, res=None): + import win32ui res=eval(str(res)) - - self.partner_id_list=eval(str(self.partner_id_list)) - if self.partner_id_list.get(sel,-999) != -999: - res['partner_id'] = self.partner_id_list[sel] + partner = res['partner_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]}) id = execute(conn,'execute',self._dbname,int(self._uid),self._pwd,'res.partner.address','create',res) return id @@ -339,12 +339,16 @@ class XMLRpcConn(object): flag = -1 new_dict = dict(new_vals) email=new_dict['email'] + partner = new_dict['partner'] 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))]) address_id = execute( conn, 'execute', self._dbname, int(self._uid), self._pwd, 'res.partner.address', 'search', [('email','=',ustr(email))]) if not address_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={ 'name' : new_dict['name'], + vals_res_address={ + 'partner_id' : partner_id[0], + 'name' : new_dict['name'], 'street':new_dict['street'], 'street2' : new_dict['street2'], 'city' : new_dict['city'], @@ -353,12 +357,6 @@ class XMLRpcConn(object): 'fax' : new_dict['fax'], 'zip' : new_dict['zip'], } - if new_dict['partner_id'] != -1: - vals_res_address['partner_id'] = new_dict['partner_id'] - if new_dict['state_id'] != -1: - vals_res_address['state_id'] = new_dict['state_id'] - if new_dict['country_id'] != -1: - vals_res_address['country_id'] = new_dict['country_id'] temp = execute( conn, 'execute', self._dbname, int(self._uid), self._pwd, 'res.partner.address', 'write', address_id, vals_res_address) if temp: flag=1