Heat oil in a large frypan over medium high heat. Saute onion until soft and deep golden in color. Remove from frypan and set aside. Add lamb to frypan and fry (in batches if necessary) until rich chestnut brown in color, 12 to 15 minutes. Drain fat and reserve.
Preheat oven to 190 degrees C.
Spread 1/2 of the potatoes in the bottom of a 20x30cm baking dish. Season with salt and pepper to taste. Place browned lamb and onions on top, then sprinkle with thyme and season to taste. Cover with remaining potatoes, season to taste and dot with butter. Pour stock over all.
Bake in the preheated oven for 1 1/2 to 2 hours. Note: If casserole is drying out while cooking, add more stock as needed. If casserole is browning too quickly, cover with aluminium foil.