Parents in France will no longer have the liberty to whoop their children, the parliament has concluded.