Fleetwood cruised into the knockout stages of the Leasing.com Trophy on a night when 16-year-old Cian Hayes became the club's youngest-ever first-team player.
READ MORE: Win tickets for Fleetwood v Tranmere
The Cod Army needed to win this final game in Northern Group B to qualify as runners-up to Accrington Stanley and they mercilessly brushed the League Two strugglers aside with a thoroughly dominant display.
The outcome was never in doubt after Town scored three times in the opening 14 minutes and they sealed their place in Saturday's draw in style.
Town boss Barton made seven changes to the side which started in the FA Cup on Sunday at Barnet, with Danny Andrew, Kyle Dempsey, Josh Morris and Jordan Rossiter the only ones to keep their places.
The hosts absolutely flew out of the blocks and produced a blistering start to the tie.
Skipper Peter Clarke, up against the club he left in the summer, headed home Dempsey's corner to start the scoring blitz on nine minutes
Two minutes later the lead was doubled, with Dempsey again the provider as his low cross was tucked away easily by Morris.
The third goal came from distance, with Jack Sowerby smashing home from 25 yards, though his effort took a slight deflection on its way in.
Oldham boss Dino Maamria looked shell-shocked on the touchline but his mood must have improved slightly in the 25th minute, when Jonny Smith fired home cleanly, also from around 25 yards.
It was raining goals at Highbury and that wasn't the end of the first half flourish as Fleetwood made it 4-1 in the 40th minute, again in clinical style.
Leading scorer Paddy Madden, incredibly without a goal so far in the game, was the provider, sliding a perfect pass into the path of Wes Burns and he slotted beyond Zeus de la Paz from close to the penalty spot.
It was almost 4-2 as the game entered first-half stoppage-time, with Cod Army keeper Alex Cairns making a brilliant fingertip save to keep out Alex Iacovitti's arrowing drive.
Just four minutes after the restart the woodwork came to Fleetwood's rescue as Oldham's loanee wingman Smith dashed down the left flank before seeing an angled drive strike a post.
The Cod Army responded by heading up the other end and bagging a fifth goal as Madden finally got on the scoresheet on 52 minutes, tucking home Andrew's cross neatly.
Minutes later the rampant hosts were also denied by the woodwork as Dempsey's dipping strike struck the crossbar.
Credit to Oldham, they kept plugging away and were rewarded with the last word - a second goal in the 78th minute, when sub Desire Segbe-Azankpo prodded home after Iacovitti's effort was deflected into his path.
Meanwhile, teenage debutant Hayes - born on June 21, 2003 - became a Fleetwood history-maker when he came on to replace Morris in the 74th minute.
Town will be away in the second round to the winners of one of the other seven northern groups, possibly Blackpool.
Fleetwood: Cairns 7, Southam-Hales 6, Clarke 7, Dunne 7, Andrew 7, Burns 8, Dempsey 8 (Matete, 70, 6), Rossiter 7, Sowerby 8, Morris 7 (Hayes, 74, 7), Madden 7 (Garner, 70, 6).
Subs not used: Cottam, Sheron, Hill, Rydel.
Referee: Andy Haines