summaryrefslogtreecommitdiff
path: root/addons/fetchmail/fetchmail.py
diff options
context:
space:
mode:
authorTejas Tank <tta@openerp.com>2012-09-27 12:53:49 +0530
committerTejas Tank <tta@openerp.com>2012-09-27 12:53:49 +0530
commit74015667fc96e58ccacbe6b7320030a68266f644 (patch)
tree2703e4ea6d719a13e6d7eb4be4580f8696df98f1 /addons/fetchmail/fetchmail.py
parent669a6dfa7f2dc7c6b0d8572632241bc4930daef2 (diff)
[FIX] Set active model in context.
bzr revid: tta@openerp.com-20120927072349-wlkyow2py4969gtb
Diffstat (limited to 'addons/fetchmail/fetchmail.py')
-rw-r--r--addons/fetchmail/fetchmail.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/addons/fetchmail/fetchmail.py b/addons/fetchmail/fetchmail.py
index 70a05c6bd0e..2c5e16f3003 100644
--- a/addons/fetchmail/fetchmail.py
+++ b/addons/fetchmail/fetchmail.py
@@ -195,7 +195,7 @@ openerp_mailgate.py -u %(uid)d -p PASSWORD -o %(model)s -d %(dbname)s --host=HOS
strip_attachments=(not server.attach),
context=context)
if res_id and server.action_id:
- action_pool.run(cr, uid, [server.action_id.id], {'active_id': res_id, 'active_ids':[res_id]})
+ action_pool.run(cr, uid, [server.action_id.id], {'active_id': res_id, 'active_ids':[res_id], 'active_model': context.get("thread_model")})
imap_server.store(num, '+FLAGS', '\\Seen')
cr.commit()
count += 1
@@ -220,7 +220,7 @@ openerp_mailgate.py -u %(uid)d -p PASSWORD -o %(model)s -d %(dbname)s --host=HOS
strip_attachments=(not server.attach),
context=context)
if res_id and server.action_id:
- action_pool.run(cr, uid, [server.action_id.id], {'active_id': res_id, 'active_ids':[res_id]})
+ action_pool.run(cr, uid, [server.action_id.id], {'active_id': res_id, 'active_ids':[res_id], 'active_model': context.get("thread_model")})
pop_server.dele(num)
cr.commit()
_logger.info("fetched/processed %s email(s) on %s server %s", numMsgs, server.type, server.name)