Merge lp:~openerp-dev/openobject-addons/6.1-opw-579592-ado into lp:openobject-addons/6.1

Proposed by Amit Dodiya (OpenERP)
Status: Needs review
Proposed branch: lp:~openerp-dev/openobject-addons/6.1-opw-579592-ado
Merge into: lp:openobject-addons/6.1
Diff against target: 55 lines (+13/-4)
3 files modified
mail/mail_message.py (+2/-1)
plugin/plugin_handler.py (+2/-2)
plugin_outlook/static/openerp-outlook-plugin/OpenERPOutlookPlugin/OpenERPOutlookPlugin.cs (+9/-1)
To merge this branch: bzr merge lp:~openerp-dev/openobject-addons/6.1-opw-579592-ado
Reviewer Review Type Date Requested Status
Xavier ALT Pending
Naresh(OpenERP) Pending
Review via email: mp+128480@code.launchpad.net

Description of the change

Hello,

"[FIX] outlookplugin64_bit gives traceback while clicking on document button on office2010_64bit"

Steps:
1). Install OutlookPluginSetup64-bit and configure with Office 2010 64-bit
2). Now try to use the document button on outlook it gives error.

Thanks,
Amit

To post a comment you must log in.
7018. By Amit Dodiya<email address hidden>

[FIX] outlook plugin for 64 bit gives traceback while clicking on document button

Unmerged revisions

7018. By Amit Dodiya<email address hidden>

[FIX] outlook plugin for 64 bit gives traceback while clicking on document button

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'mail/mail_message.py'
2--- mail/mail_message.py 2012-07-27 13:50:07 +0000
3+++ mail/mail_message.py 2012-10-08 13:12:37 +0000
4@@ -437,7 +437,8 @@
5 if 'text/html' in msg.get('content-type', ''):
6 msg['body_html'] = body
7 msg['subtype'] = 'html'
8- body = tools.html2plaintext(body)
9+ if not msg['body_html']:
10+ body = tools.html2plaintext(body)
11 msg['body_text'] = tools.ustr(body, encoding, errors='replace')
12
13 attachments = []
14
15=== modified file 'plugin/plugin_handler.py'
16--- plugin/plugin_handler.py 2011-12-26 17:12:29 +0000
17+++ plugin/plugin_handler.py 2012-10-08 13:12:37 +0000
18@@ -44,11 +44,11 @@
19 url = ""
20 name = ""
21 msg = mail_message_obj.parse_message(email)
22- references = [msg.get('message-id')]
23+ references = msg.get('message-id')
24 refs = msg.get('references',False)
25 if refs:
26 references.extend(refs.split())
27- msg_ids = mail_message_obj.search(cr, uid, [('message_id','in',references)])
28+ msg_ids = mail_message_obj.search(cr, uid, [('message_id','=',references)])
29 if msg_ids:
30 msg = mail_message_obj.browse(cr, uid, msg_ids[0])
31 res_id = msg.res_id
32
33=== modified file 'plugin_outlook/static/openerp-outlook-plugin/OpenERPOutlookPlugin/OpenERPOutlookPlugin.cs'
34--- plugin_outlook/static/openerp-outlook-plugin/OpenERPOutlookPlugin/OpenERPOutlookPlugin.cs 2011-12-09 14:28:39 +0000
35+++ plugin_outlook/static/openerp-outlook-plugin/OpenERPOutlookPlugin/OpenERPOutlookPlugin.cs 2012-10-08 13:12:37 +0000
36@@ -144,7 +144,15 @@
37 OpenERPConnect openerp_connect = openerp_outlook.Connection;
38 ArrayList args = new ArrayList();
39 Hashtable vals = new Hashtable();
40- string email = Tools.GetHeader(mail); //TODO: Outlook.MailItem Should be Converted into MIME Message
41+ string email;
42+ if (Tools.GetHeader(mail)!= null)
43+ {
44+ email = Tools.GetHeader(mail); //TODO: Outlook.MailItem Should be Converted into MIME Message
45+ }
46+ else
47+ {
48+ email = "";
49+ }
50 args.Add(model);
51 args.Add(email.ToString());
52 args.Add(thread_id);
53
54=== modified file 'plugin_outlook/static/openerp-outlook-plugin/OpenERPOutlookPluginSetup64.msi' (properties changed: -x to +x)
55Binary files plugin_outlook/static/openerp-outlook-plugin/OpenERPOutlookPluginSetup64.msi 2012-02-16 17:21:36 +0000 and plugin_outlook/static/openerp-outlook-plugin/OpenERPOutlookPluginSetup64.msi 2012-10-08 13:12:37 +0000 differ