Preheat the oven to 160C/140 fan/Gas 3.
Heat 3 tablespoons of the oil in a medium, shallow, lidded casserole over a medium heat. Add the onions and fry for 4-5 minutes, or until they begin to turn golden-brown.
Add 500ml/18fl oz water and bring to the boil, then reduce the heat until the water is simmering and simmer gently for 20 minutes, or until the water has all but evaporated.
Heat another 4 tablespoons of the oil in a separate frying pan over a medium heat. Add the aubergine pieces, in batches if necessary, and fry until lightly coloured on both sides - about 5-6 minutes (add more oil to the pan as necessary). Repeat the process with the courgette rounds. Set aside.
Add the tomato halves to the stewed onions, then season well with salt and freshly ground black pepper, cover the casserole with the lid and cook for 8-10 minutes, or until cooked through.
Add the flageolet and haricot beans to the onions and tomatoes, then stir in the courgettes and aubergines.
Melt the butter and the remaining tablespoon of oil in a frying pan over a medium heat. Stir in the carrot ribbons until completely coated in the fat, then arrange them in a tangle on top of the casserole.
Add the beetroot slices to the frying pan and cook for 4-5 minutes until softened. Arrange the beetroot slices among the tangled carrots. Sprinkle over the thyme leaves.
Bake the hotpot in the oven for 45-60 minutes, or until the vegetables on top have turned crisp and golden-brown and the casserole has thickened. Serve.