All German fighter pilots had to go through gunnery school (FliegerSchützenSchule), Erich Hartmann did it as-well.
There were several of these schools, including the Værløse Luftwaffe FliegerSchützenSchule in Denmark.
You can read about some of them here:
Various schools
And then here about the FliegerSchützenSchule for bomber gunners, later renamed to BordSchützenSchulen in 1942 (as written), the designation FSS still used for the fighter pilots. And up until very late in the war it was a 5 month process:
Kampfflieger: Bomber Crewman of the ... - Google Bogsøgning