diff --git a/addons/thunderbird/partner/partner.py b/addons/thunderbird/partner/partner.py index fc59d4076e0..6421e239f2c 100644 --- a/addons/thunderbird/partner/partner.py +++ b/addons/thunderbird/partner/partner.py @@ -158,6 +158,7 @@ class thunderbird_partner(osv.osv_memory): msg_pool = self.pool.get('mailgate.message') msg_ids = msg_pool.search(cr, uid, [('message_id','=',message_id)]) res = {} + res_ids = [] if msg_ids and len(msg_ids): return 0 @@ -170,7 +171,8 @@ class thunderbird_partner(osv.osv_memory): if model_data: res_id = int(model_data[0]) server_tools_pool.history_message(cr, uid, model, res_id, msg_new) - return True + res_ids.append(res_id) + return len(res_ids) def process_email(self, cr, uid, vals): dictcreate = dict(vals) diff --git a/addons/thunderbird/plugin/openerp_plugin.xpi b/addons/thunderbird/plugin/openerp_plugin.xpi index 7f9bbc47b76..165781bb579 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 4003f9af386..4afd40519d7 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 2a4f09ff673..77b3ba8598a 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 @@ -1392,7 +1392,22 @@ var listArchiveHandler = { netscape.security.PrivilegeManager.enablePrivilege('UniversalXPConnect UniversalBrowserAccess'); list_documents = document.getElementById('listSearchBox') var createId = result.QueryInterface(Components.interfaces.nsISupportsPRInt32); - alert("Mail is Already Archived Successfully.") + createId = parseInt(createId); + if(createId==0) + { + alert("Mail is Already Archived Successfully."); + } + else if (createId<0) + { + alert("sorry Mail is not Archived to" +" " + ":" + " "+ list_documents.value); + + } + + else if (createId>=1) + { + alert("Mail Archived Successfully to" +" " + ":" + " "+ list_documents.value); + } + window.close(); }, onFault: function (client, ctxt, fault) { @@ -1471,8 +1486,8 @@ function upload_archivemail() var arrofarr = dictcontact(a,b); xmlRpcClient.asyncCall(listArchiveHandler,null,'execute',[strDbName,struids,strpass,strobj,strmethod,arrofarr],6); - alert("Mail Archived Successfully to" +" " + ":" + " "+ list_documents.value); - window.close(); + // alert("Mail Archived Successfully to" +" " + ":" + " "+ list_documents.value); + //window.close(); }