Cut the cod into pieces after having it peeled and removed from the bones, place it in a pan with two tablespoons of oil and cook over a high flame. Once cooked put it in a bowl and work it to reduce it in cream, add the crushed boiled potato, two to three tablespoons of oil, the thyme, a ground pepper and adjust salt; a soft filling must be obtained. In a pan, sauté the sliced onions with a little oil and water, add salt and cook; remove the lid and tighten the sauce. Cook the paccheri in boiling salted water, drain them al dente and season them with a little oil to prevent them from sticking. Fill with the filling of baccala and align in the dish, put the mozzarella cut into small pieces and grill for 4-5 minutes. Add a teaspoon of onion sauce and serve on each pacchero.