Desalt the cod by soaking it in cold water overnight, changing the water twice. Heat 6 tablespoons of oil in a pan, then fry the cod cut into pieces with the skin and bones removed. Put the cod to one side. Chop the onions and tomatoes. Crush the garlic cloves. Heat the remaining oil and add the onions. After a moment add the cod, tomatoes, garlic, turmeric and thyme at the same time. Add chillies to taste. Cook over low heat for 20 minutes.