Preheat the oven to 180–200°C.
Put the olive oil into a large pan or a shallow casserole dish on a medium heat. Add the butifarra and let it caramelize, then take it out of the pan.
Add the garlic to the pan and when it starts to turn golden, add the onions with a pinch of salt and a grind of pepper. Cook until the onions are golden brown, then add the thyme and bay leaves. Pour in the sherry and cook until evaporated.
Cut the butifarra into 4 pieces and add to the pan, with just enough stock or water to cover the onions. Season and cook in the oven, uncovered, until the top of the butifarra turns slightly golden.
Finish with the chopped parsley and a drizzle of olive oil. Serve with good bread, to scoop up the juices.