summaryrefslogtreecommitdiff
path: root/addons/mail/email_thread.py
diff options
context:
space:
mode:
authorRifakat Haradwala (Open ERP) <rha@tinyerp.com>2011-04-21 14:41:25 +0530
committerRifakat Haradwala (Open ERP) <rha@tinyerp.com>2011-04-21 14:41:25 +0530
commitb794d93e2a42eac8f3466c290b5ce7bdfc8a8547 (patch)
tree07b82d13b7c493329cae8150abb8467288a5a383 /addons/mail/email_thread.py
parentb511ca0034c5de98e7ffb6959ab9abdf0b3c80da (diff)
[FIX] thunderbird: changes in partner.py for history()
bzr revid: rha@tinyerp.com-20110421091125-nevt80ac5y1vn5jy
Diffstat (limited to 'addons/mail/email_thread.py')
-rw-r--r--addons/mail/email_thread.py9
1 files changed, 5 insertions, 4 deletions
diff --git a/addons/mail/email_thread.py b/addons/mail/email_thread.py
index 796fc35bb92..df26adab354 100644
--- a/addons/mail/email_thread.py
+++ b/addons/mail/email_thread.py
@@ -158,10 +158,7 @@ class email_thread(osv.osv):
if attach is None:
attach = {}
- model = context.get('thread_model', False)
- if not model:
- model = self._name
- model_pool = self.pool.get(model)
+
if email_date:
edate = parsedate(email_date)
@@ -171,6 +168,10 @@ class email_thread(osv.osv):
# The script sends the ids of the threads and not the object list
if all(isinstance(thread_id, (int, long)) for thread_id in threads):
+ model = context.get('thread_model', False)
+ if not model:
+ model = self._name
+ model_pool = self.pool.get(model)
threads = model_pool.browse(cr, uid, threads, context=context)
att_obj = self.pool.get('ir.attachment')