Merge lp:~yann-papouin/openobject-addons/6.1-bug-1222859-mail-thread-wosubject into lp:openobject-addons/6.1

Proposed by Yann Papouin
Status: Needs review
Proposed branch: lp:~yann-papouin/openobject-addons/6.1-bug-1222859-mail-thread-wosubject
Merge into: lp:openobject-addons/6.1
Diff against target: 21 lines (+2/-2)
1 file modified
mail/mail_thread.py (+2/-2)
To merge this branch: bzr merge lp:~yann-papouin/openobject-addons/6.1-bug-1222859-mail-thread-wosubject
Reviewer Review Type Date Requested Status
OpenERP Core Team Pending
Review via email: mp+184728@code.launchpad.net

Description of the change

Add a subject string "(No subject)" to python dictionnary if no subject is parsed from the mail.

To post a comment you must log in.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'mail/mail_thread.py'
--- mail/mail_thread.py 2012-08-10 11:48:38 +0000
+++ mail/mail_thread.py 2013-10-10 09:03:04 +0000
@@ -227,7 +227,7 @@
227 if not partner_id and thread._name == 'res.partner':227 if not partner_id and thread._name == 'res.partner':
228 partner_id = thread.id228 partner_id = thread.id
229 data = {229 data = {
230 'subject': subject,230 'subject': subject or _('(No subject)'),
231 'user_id': uid,231 'user_id': uid,
232 'model' : thread._name,232 'model' : thread._name,
233 'partner_id': partner_id,233 'partner_id': partner_id,
@@ -357,7 +357,7 @@
357 references = msg.get('references') or msg.get('in-reply-to')357 references = msg.get('references') or msg.get('in-reply-to')
358 match = tools.reference_re.search(references)358 match = tools.reference_re.search(references)
359 if match: res_id = match.group(1)359 if match: res_id = match.group(1)
360 if not res_id:360 if not res_id and msg.get('subject'):
361 match = tools.res_re.search(msg['subject'])361 match = tools.res_re.search(msg['subject'])
362 if match: res_id = match.group(1)362 if match: res_id = match.group(1)
363 if res_id:363 if res_id: