summaryrefslogtreecommitdiff
path: root/addons/fetchmail/fetchmail.py
diff options
context:
space:
mode:
authorXavier ALT <xal@openerp.com>2012-04-26 10:03:00 +0200
committerXavier ALT <xal@openerp.com>2012-04-26 10:03:00 +0200
commit20d2d1215fbd5465d28f22c27259a9f5e2c9d1e7 (patch)
tree086db9cf95507f442bbca25515f9c81a759b9830 /addons/fetchmail/fetchmail.py
parent7c27101d57afc4dacdb72040848913ebd33b4ad7 (diff)
parent0560002844002ac8ec8c360209fb7040988a8415 (diff)
[MERGE] server action: fix missing active_model in context when calling server action run()
bzr revid: xal@openerp.com-20120426080300-ufex83412qnuzfwe
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 51702cf28fe..0c2395fa0ad 100644
--- a/addons/fetchmail/fetchmail.py
+++ b/addons/fetchmail/fetchmail.py
@@ -194,7 +194,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': server.object_id.model})
imap_server.store(num, '+FLAGS', '\\Seen')
cr.commit()
count += 1
@@ -219,7 +219,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': server.object_id.model})
pop_server.dele(num)
cr.commit()
logger.info("fetched/processed %s email(s) on %s server %s", numMsgs, server.type, server.name)