Fry the diced onion in vegetable oil until golden brown.
Melt margarine, add fried onions, salt, pepper, and your favorite spices to it. I added 1 teaspoon of turmeric and Mediterranean herbs.
Add the grated processed cheese.
Add beer and flour.
Knead an elastic dough and leave it in the refrigerator for an hour.
Roll out the dough into a layer, about 2 mm thick.
Sprinkle with poppy seeds (sesame seeds, paprika can be used). Press down slightly with a rolling pin. Chop whatever your heart desires and bake the onion cookies in an oven preheated to 180 degrees.