Heat the oil and fry the onions for 3 minutes, stirring. Mash the beans and mix with the onions and the remaining ingredients. Place in a small, well-greased loaf pan and bake in a preheated oven at 190 degrees for about 30 minutes. Let cool a little, turn out and serve instead of meat.