'unlink ir.action.todo which are related to actions which will be deleted.
NOTE: ondelete cascade will not work on ir.actions.actions so we will need to do it manually.'

@api.multi
def unlink(self):

    todos = self.env['ir.actions.todo'].search([('action_id', 'in', self.ids)])
    todos.unlink()
    res = super(IrActions, self).unlink()
    self.env['ir.values'].clear_caches()
    return res
