Saute onion in oil in a skillet over low-medium heat for 5 minutes till soft. Add garlic and mushrooms. Cook a few more minutes. Sprinkle in flour, stir well. Slowly add vegetable stock and continue stirring. Bring to a boil, then let simmer 2-3 minutes. Stir in nuts, soy sauce, breadcrumbs, herbs, salt and pepper. Turn onto floured board and form a loaf. Coat evenly with flour on all sides, then place the loaf in the pan. Bake 30-40 minutes, basting occasionally.