France has a mixed military record, but it has a fair share of victories as opposed to an unbroken string of defeats, and the people who make that claim are unaware of several facts:
The Continental Army during the American Revolution was largely French equipped, funded, and led, though trained by a German impostor. The French Army, which deployed troops to the American mainland by the thousands, and especially Navy, played a huge role in achieving an American victory.
The French ultimately won the Hundred Years' War against the English, with the help of a teenage farmgirl as well as superior overall planning. In fact, the French actually came out of the conflict holding more territory than they had before. Still, the war was characterized by three 'hot' periods and two 'cold' periods. The English won decisively the first hot period, while the French won a limited victory in the second and a complete victory in the third, taking bites out of the domains of the Counts of Burgundy, England's allies in the war.
In the 17th and 18th century, Louis XIV lead many succesful military campaigns in Europe. Despite victory, however, Louis' campaigns did not appreciably increase French power (which may not be saying much, as France was the most powerful state in Europe long before and after Louis) and were extremely expensive, forcing the French government into debt, beginning the falling of the fiscal dominoes that would eventually result France's bankruptcy and the French Revolution.
Charlemagne and Napoleon Bonaparte (who, admittedly, was ethnically Italian) also led many French victories and conquered almost all of Europe. The achievements of both nevertheless came to naught. In Charlemagne's case, his heirs split his empire into three (much weaker) kingdoms, while Napoleon's reign ended with the France's complete defeat, restoration of the Bourbon dynasty, and the end of the Revolution.
During the First World War, the French kicked enormous amounts of ass, especially considering their best industrial land was overrun in the first weeks, bearing the brunt of Allied casualties and claiming the majority of Allied victories in the West. In the Second World War, the French Resistance had much tactical significance, in that the Allies coordinated their actions with those of the invasion force, giving some pretty spectacular results. However, their overall impact on the course of the war has been much overstated.
The Free French Forces led by General De Gaulle kicked some ass during World War II alongside the Allies. They said This is BIR HAKEIM! to Rommel, covering the British retreat in the process.
Finally, the French have a reputation for revolutions. From the Jacquerie during the Middle Ages, over the French Revolution, the Communards and Mai 1968. When it comes to senselessly slaughering people, the French made their fair share by putting thousands to the guillotine.
As for unambiguous French defeats the two most serious are certainly the Seven Years War (1756-1763), in which they lost all of their New World domains (some of which Napoleon later recovered and sold to the United States), and the Franco-Prussian War (1870-71), during which Emperor Napoleon III was captured in battle. The Prussians then forced the French to cede Alsace-Lorraine, pay a five billion franc indemnity, and allow the coronation of Wilhelm I as German Emperor at Versailles, Louis XIV's palace.
In a nutshell, the French are neither as incompetent as they are sometimes portrayed, nor as capable as they might have been.