Flan: Melt margarine and brown onion gently in it. Stir in flour and slowly add milk, stirring all the time. Once at the boil, add breadcrumbs, nuts and seasoning. Remove from heat, and press mixture into greased flan mould, so that it covers the base and sides. Bake in preheated oven for about 30 minutes.
Mushroom Filling: Melt butter, add onion and mushrooms. Cook until soft. Add flour and slowly add milk, stirring all the time. When sauce has thickened, pour into baked flan case and cook a further 10 minutes at the same heat.