[IMP] changes in fetchmail and automated action to pass active_model info

bzr revid: ahu@openerp.com-20120315143340-eec06wl7o1xb5oj9
This commit is contained in:
Antoine Huvelle 2012-03-15 15:33:40 +01:00
parent 0284caa8f0
commit bea0aa0229
2 changed files with 2 additions and 2 deletions

View File

@ -389,7 +389,7 @@ the rule to mark CC(mail to any other person defined in actions)."),
context = {}
if action.server_action_id:
context.update({'active_id':obj.id, 'active_ids':[obj.id]})
context.update({'active_id':obj.id, 'active_ids':[obj.id],'active_model':obj._name})
self.pool.get('ir.actions.server').run(cr, uid, [action.server_action_id.id], context)
write = {}

View File

@ -192,7 +192,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