Preheat the oven to 180°C fan/200°C/gas 6.
Mix the mushrooms, and onion with the spices, salt and olive oil in a large, deep roasting tin. Transfer to the oven and roast for 25 minutes.
Drain and rinse all the beans and add to the tin with the chopped tomatoes and stock. Give everything a good stir, then return to the oven and cook, uncovered, for 35 minutes.