Peel the onion and garlic, chop them and put them to harden with a little oil, when they start to brown, add the cleaned and sliced mushrooms and let them simmer until all the water that leaves them decreases.
Meanwhile, prepare a dough from the above ingredients and divide it into 2 pieces, one larger for the base and one smaller.
We spread the bigger piece and with the obtained sheet we wallpaper a tray and its walls, on the bottom we put a layer of ham, on top of a cheese one, then we put the mushrooms and on top we grate smoked cheese (if you like we put an beaten egg with sour cream on top).
We take the other piece, we spread it and with the obtained sheet we cover the tart, then we make a few holes with a fork so as not to swell.
Put in the preheated oven at 180 ° until nicely browned.