No, it isn't. You had it backwards.
This is what you posted:
'France had allied with Portugal to attack and conquer Spain. Godoy the man who had proposed that alliance had already been overthrown and Ferdinand had assumed power.'
France was allied with Spain. Not the other way round. And the Spanish agreed to invade and conquer Portugal in 1807 with the French. And Godoy was still in power at the time. The Spanish were late going into Portugal.
Napoleon asked for and got Romana's command assigned to him in northern Europe because of the evidence of Spanish treachery he found in Berlin.
Again, take a look at Oman and Esdaile. Esdaile covers the issue quite well, including Ferdinand for all intents and purposes performin a coup against his father. He also asked Napoleon to arrange for him to get a wife. And Godoy was still in office through 1807.
If you need any help in understanding the issue I'd be more than happy to help you.