diff --git a/addons/plugin/plugin_handler.py b/addons/plugin/plugin_handler.py index 0664af1c92e..434f557bca2 100644 --- a/addons/plugin/plugin_handler.py +++ b/addons/plugin/plugin_handler.py @@ -95,14 +95,13 @@ class plugin_handler(osv.osv_memory): msg = self.pool.get('mail.thread').message_parse(cr, uid, email) message_id = msg.get('message-id') mail_ids = mail_message.search(cr, uid, [('message_id','=',message_id),('res_id','=',res_id),('model','=',model)]) - if message_id and mail_ids : mail_record = mail_message.browse(cr, uid, mail_ids)[0] res_id = mail_record.res_id notify = "Email already pushed" elif res_id == 0: if model == 'res.partner': - notify = 'User the Partner button to create a new partner' + notify = 'Use the Partner button to create a new partner' else: res_id = model_obj.message_process(cr, uid, model, email) notify = "Mail successfully pushed, a new %s has been created " % model @@ -155,6 +154,7 @@ class plugin_handler(osv.osv_memory): push_mail = self.push_message(cr, uid, model, headers, res_id) res_id = push_mail[1] model = push_mail[0] + notify = push_mail[3] for name in attachments.keys(): attachment_ids = ir_attachment_obj.search(cr, uid, [('res_model', '=', model), ('res_id', '=', res_id), ('datas_fname', '=', name)]) if attachment_ids: @@ -166,4 +166,4 @@ class plugin_handler(osv.osv_memory): if mail_ids: ids = mail_message.write(cr, uid, mail_ids[0], { 'attachment_ids': [(6, 0, attach_ids)],'body':body,'body_html':body_html}) url = self._make_url(cr, uid, res_id, model) - return (model, res_id, url) + return (model, res_id, url,notify) diff --git a/addons/plugin_outlook/static/openerp-outlook-plugin/OpenERPClient/OpenERPClient.csproj b/addons/plugin_outlook/static/openerp-outlook-plugin/OpenERPClient/OpenERPClient.csproj index 75fe271e5d6..f9ac3e31553 100644 --- a/addons/plugin_outlook/static/openerp-outlook-plugin/OpenERPClient/OpenERPClient.csproj +++ b/addons/plugin_outlook/static/openerp-outlook-plugin/OpenERPClient/OpenERPClient.csproj @@ -17,6 +17,7 @@ 3.5 + false publish\ true Disk @@ -29,7 +30,6 @@ true 0 1.0.0.%2a - false false true @@ -53,9 +53,8 @@ AllRules.ruleset - - False - ..\OpenERPOutlookPlugin\bin\Release\CookComputing.XmlRpcV2.dll + + ..\CookComputing.XmlRpcV2.dll @@ -81,7 +80,7 @@ False - .NET Framework 3.5 SP1 Client Profile + .NET Framework 3.5 SP1 Client Profile false @@ -91,7 +90,7 @@ False - Windows Installer 3.1 + Windows Installer 3.1 true diff --git a/addons/plugin_outlook/static/openerp-outlook-plugin/OpenERPOutlookPlugin.sln b/addons/plugin_outlook/static/openerp-outlook-plugin/OpenERPOutlookPlugin.sln index f4705664cf4..ad53769e5b4 100644 --- a/addons/plugin_outlook/static/openerp-outlook-plugin/OpenERPOutlookPlugin.sln +++ b/addons/plugin_outlook/static/openerp-outlook-plugin/OpenERPOutlookPlugin.sln @@ -1,6 +1,6 @@  -Microsoft Visual Studio Solution File, Format Version 10.00 -# Visual Studio 2008 +Microsoft Visual Studio Solution File, Format Version 11.00 +# Visual Studio 2010 Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "OpenERPOutlookPlugin", "OpenERPOutlookPlugin\OpenERPOutlookPlugin.csproj", "{F4B2219B-F235-400F-81B4-92F15250BBA4}" EndProject Project("{54435603-DBB4-11D2-8724-00A0C9A8B90C}") = "OpenERPOutlookPluginSetup", "OpenERPOutlookPluginSetup\OpenERPOutlookPluginSetup.vdproj", "{96333293-0156-4998-9065-42721CEB0368}" diff --git a/addons/plugin_outlook/static/openerp-outlook-plugin/OpenERPOutlookPlugin/Connect.cs b/addons/plugin_outlook/static/openerp-outlook-plugin/OpenERPOutlookPlugin/Connect.cs index 1336c7f7695..dae4db88aa2 100644 --- a/addons/plugin_outlook/static/openerp-outlook-plugin/OpenERPOutlookPlugin/Connect.cs +++ b/addons/plugin_outlook/static/openerp-outlook-plugin/OpenERPOutlookPlugin/Connect.cs @@ -303,6 +303,7 @@ namespace OpenERPOutlookPlugin foreach (outlook.MailItem mailitem in Tools.MailItems()) { + Object[] contact = Cache.OpenERPOutlookPlugin.RedirectPartnerPage(mailitem); if ((int)contact[1] > 0) diff --git a/addons/plugin_outlook/static/openerp-outlook-plugin/OpenERPOutlookPlugin/OpenERPOutlookPlugin.cs b/addons/plugin_outlook/static/openerp-outlook-plugin/OpenERPOutlookPlugin/OpenERPOutlookPlugin.cs index b057201b8d1..e1d45318ee4 100644 --- a/addons/plugin_outlook/static/openerp-outlook-plugin/OpenERPOutlookPlugin/OpenERPOutlookPlugin.cs +++ b/addons/plugin_outlook/static/openerp-outlook-plugin/OpenERPOutlookPlugin/OpenERPOutlookPlugin.cs @@ -95,7 +95,6 @@ namespace OpenERPOutlookPlugin /* * Will open the url into the web browser. */ - System.Diagnostics.Process.Start(web_url.ToString()); } @@ -163,9 +162,16 @@ namespace OpenERPOutlookPlugin args.Add(attachments); object push_mail = this.Connection.Execute("plugin.handler", "push_message_outlook", args.ToArray()); object[] push = (object[])push_mail; - this.RedirectWeb(push[2].ToString()); - return true; + if (Convert.ToInt32(push[1]) == 0) + { + MessageBox.Show(push[3].ToString()); + } + else + { + this.RedirectWeb(push[2].ToString()); + } + return true; } public long CreatePartnerRecord(string name) { diff --git a/addons/plugin_outlook/static/openerp-outlook-plugin/OpenERPOutlookPluginSetup32.msi b/addons/plugin_outlook/static/openerp-outlook-plugin/OpenERPOutlookPluginSetup32.msi index a31471c28ba..9d9dd5d3ad3 100644 Binary files a/addons/plugin_outlook/static/openerp-outlook-plugin/OpenERPOutlookPluginSetup32.msi and b/addons/plugin_outlook/static/openerp-outlook-plugin/OpenERPOutlookPluginSetup32.msi differ diff --git a/addons/plugin_outlook/static/openerp-outlook-plugin/OpenERPOutlookPluginSetup64.msi b/addons/plugin_outlook/static/openerp-outlook-plugin/OpenERPOutlookPluginSetup64.msi index 87cac88be70..0c2fa88bb24 100644 Binary files a/addons/plugin_outlook/static/openerp-outlook-plugin/OpenERPOutlookPluginSetup64.msi and b/addons/plugin_outlook/static/openerp-outlook-plugin/OpenERPOutlookPluginSetup64.msi differ