Peel the onions and cut them in half, creating circular patterns after baking. Slicing the onions thickly is also an option if preferred. Melt the butter over medium heat with a drizzle of olive oil. Add the sugar and mix well. Add the onions to the pan and pour in the Balsamic Vinegar. Add a pinch of water and cook over medium-low heat for 30 minutes. Flip the onions halfway through cooking.
Prepare the pastry by mixing the flour, salt, butter, very cold water, knead briefly and form a ball. Refrigerate until ready to use.
Arrange the onion halves on the bottom of a baking dish, cut side down. Pour the caramel over them. Roll out the pastry with a rolling pin on a lightly floured surface. Form a circle as big as the baking dish. Place the pastry over the onions.
Preheat the oven to 350°F. Bake for 30 minutes.
Place a large serving plate over the pastry crust and flip the tart all at once.
Remove the baking dish. Add the salted ricotta cheese and decorate with some sprigs of thyme.