From 9e6d14a2890d79bd598fa148b5d6fac5f49857e9 Mon Sep 17 00:00:00 2001 From: Chris Biersbach Date: Tue, 19 Mar 2013 11:38:22 +0100 Subject: [PATCH] [IMP] Removed unnecessary code in project_issue.py, fixed a small error in mail_thread bzr revid: cbi@openerp.com-20130319103822-ss4y3na3i4hip4e0 --- addons/mail/mail_thread.py | 2 +- addons/project_issue/project_issue.py | 4 +--- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/addons/mail/mail_thread.py b/addons/mail/mail_thread.py index 4ce99be190c..1a516db9070 100644 --- a/addons/mail/mail_thread.py +++ b/addons/mail/mail_thread.py @@ -927,7 +927,7 @@ class mail_thread(osv.AbstractModel): model = context.get('thread_model', self._name) if self._name == 'mail.thread' else self._name if model != self._name: del context['thread_model'] - return self.pool.get(model).message_post(cr, uid, thread_id, body=body, subject=subject, type=type, subtype=subtype, parent_id=parent_id, attachments=attachments, context=ctx, content_subtype=content_subtype, **kwargs) + return self.pool.get(model).message_post(cr, uid, thread_id, body=body, subject=subject, type=type, subtype=subtype, parent_id=parent_id, attachments=attachments, context=context, content_subtype=content_subtype, **kwargs) # 1: Handle content subtype: if plaintext, converto into HTML if content_subtype == 'plaintext': diff --git a/addons/project_issue/project_issue.py b/addons/project_issue/project_issue.py index 88feee529c2..01dab2962f3 100644 --- a/addons/project_issue/project_issue.py +++ b/addons/project_issue/project_issue.py @@ -563,9 +563,7 @@ class project_issue(base_stage, osv.osv): res = super(project_issue, self).message_post(cr, uid, thread_id, body=body, subject=subject, type=type, subtype=subtype, parent_id=parent_id, attachments=attachments, context=context, content_subtype=content_subtype, **kwargs) if thread_id: - model = context.get('thread_model', self._name) - if model == self._name: - self.write(cr, uid, thread_id, {'date_action_last': time.strftime(tools.DEFAULT_SERVER_DATETIME_FORMAT)}, context=context) + self.write(cr, uid, thread_id, {'date_action_last': time.strftime(tools.DEFAULT_SERVER_DATETIME_FORMAT)}, context=context) return res