Upvote:2
Let's take a look at the steps in your itinerary.
You fly into Portugal. Here they might like to see onwards travel from the Schengen area (usually the check-in agents are more insistent than immigration officers). You show them the Spain - Morocco ticket as that's valid onward travel.
You fly from Spain to Portugal. No immigration checks here and in any case you have your ticket to Morocco.
You fly from Portugal to Morocco. Here you show them your ticket from Morocco to Paris.
You fly from Morocco to Paris. That's the only part of the itinerary which is problematic - you wouldn't have valid proof of onwards travel.
To solve this issue you have several options: