Peel the onion and carrots, cut the carrots into cubes. Peel the pearl onions. Cut the bacon into large lardons.
Season the beef shank with salt and pepper and brown it well in a casserole with 6 tablespoons of oil. Add the thyme leaves, carrots, the halved onion studded with cloves.
Preheat the oven to 392°F (Gas mark 6-7). Pour 3 liters of water into the casserole and add the crumbled bouillon cubes. Cover and bring to a boil. Transfer the covered casserole to the oven and simmer for 2 hours.
Slice the endive. Remove the casserole from the oven, add the drained mushrooms and endive, cover, and return to the oven for 1 hour.
Fry the bacon in a pan with the remaining oil. Boil the potatoes in salted water for 20 minutes. Drain them.
Place the pearl onions in a sauté pan with the butter and cover halfway with cold water. Season with salt and pepper, and cover with parchment paper with a hole in the center. Bring to a boil and cook for 10 to 15 minutes until tender.
Remove the parchment paper and set aside the onions. Reduce the cooking liquid and then glaze the onions by rolling them well in the reduction.
Remove the clove-studded onion from the casserole. Add the bacon, glazed onions, and potatoes. Sprinkle with chopped parsley. Serve the casserole directly at the table.