[IMP] changes in fetchmail and automated action to pass active_model info
bzr revid: ahu@openerp.com-20120315143340-eec06wl7o1xb5oj9
This commit is contained in:
@@ -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 = {}
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user