You will probably have quite a bit of oil left over after frying the onions. You can allow the oil to cool and then strain it through a sieve to remove any bits of flour and onion and then store it in a glass jar. The oil will have a slight onion flavour which makes it ideal for frying chips or steak, but unsuitable for use in sweet dishes.