diff --git a/addons/thunderbird/partner/partner.py b/addons/thunderbird/partner/partner.py index ec00bac1ae2..7041faa8dc0 100644 --- a/addons/thunderbird/partner/partner.py +++ b/addons/thunderbird/partner/partner.py @@ -156,8 +156,12 @@ class thunderbird_partner(osv.osv_memory): for ref_id in ref_ids: ref = ref_id.split(',') model = ref[0] - res_id = int(ref[1]) - server_tools_pool.history_message(cr, uid, model, res_id, msg) + model_obj = self.pool.get(model) + model_data = model_obj.search(cr, uid,[('name', 'ilike', ref[1])]) + res = ref[1] + if model_data: + res_id = int(model_data[0]) + server_tools_pool.history_message(cr, uid, model, res_id, msg) return True def process_email(self, cr, uid, vals): diff --git a/addons/thunderbird/plugin/openerp_plugin.xpi b/addons/thunderbird/plugin/openerp_plugin.xpi index 07b83afbd40..790f326d4f5 100644 Binary files a/addons/thunderbird/plugin/openerp_plugin.xpi and b/addons/thunderbird/plugin/openerp_plugin.xpi differ diff --git a/addons/thunderbird/plugin/openerp_plugin/chrome/openerp_plugin.jar b/addons/thunderbird/plugin/openerp_plugin/chrome/openerp_plugin.jar index 088b21a479f..27392f2e6e8 100644 Binary files a/addons/thunderbird/plugin/openerp_plugin/chrome/openerp_plugin.jar and b/addons/thunderbird/plugin/openerp_plugin/chrome/openerp_plugin.jar differ diff --git a/addons/thunderbird/plugin/openerp_plugin/chrome/openerp_plugin/content/tiny_xmlrpc.js b/addons/thunderbird/plugin/openerp_plugin/chrome/openerp_plugin/content/tiny_xmlrpc.js index 8621df5d2d1..fcd22f3889f 100755 --- a/addons/thunderbird/plugin/openerp_plugin/chrome/openerp_plugin/content/tiny_xmlrpc.js +++ b/addons/thunderbird/plugin/openerp_plugin/chrome/openerp_plugin/content/tiny_xmlrpc.js @@ -1219,8 +1219,8 @@ var listSearchCheckboxHandler = { listcell.setAttribute("height",12); listcell.setAttribute("label",arrFinalList[i][j][1]); //stores the name ofthe record listItem.appendChild(listcell); - listItem.value = arrFinalList[i][j][0]; //stores the id of the record - listItem.label = arr1[i]; // stores the value of the object + listItem.value = arrFinalList[i][j][1]; //stores the name of the record + listItem.label = arr1[i]; // stores the value of the object cmbSearchList.appendChild(listItem); } } @@ -1463,14 +1463,16 @@ function upload_archivemail() var a = ['ref_ids','message']; var b = [ref_ids, eml_string]; var arrofarr = dictcontact(a,b); + xmlRpcClient.asyncCall(listArchiveHandler,null,'execute',[strDbName,struids,strpass,strobj,strmethod,arrofarr],6); - alert("Mail Archived Successfully."); + alert("Mail Archived Successfully to" +" " + ":" + " "+ list_documents.value); window.close(); } function create_archivemail(){ - var popup = document.getElementById("section").selectedItem; // a element + var popup = document.getElementById("section").selectedItem; + // a element if (String(popup) != "null"){ object=popup.value; @@ -1495,7 +1497,7 @@ function create_archivemail(){ var b = [object, eml_string]; var arrofarr = dictcontact(a,b); xmlRpcClient.asyncCall(listArchiveHandler,null,'execute',[strDbName,struids,strpass,strobj,strmethod,arrofarr],6); - alert("Document Created Successfully."); + alert("Document Created Successfully For " +" " + ":" + " "+ popup.label); } window.close(); } @@ -1986,7 +1988,7 @@ var listsearchAttachmentHandler = { count += 1 var hbox = document.createElement("vbox"); var checkbox1 = document.createElement("checkbox"); - + checkbox1.setAttribute("label",object[i]); checkbox1.setAttribute("id","cbx"+(i+1)); checkbox1.setAttribute("width",150)