When a Sales Order is created, if the Checkbox for "Use Shipment" is enabled, a Shipment has to be created before this can be invoiced. This is to make sure the order gets shipped out.
Check the checkbox and save the document - you will now be able to Generate a Shipment from the Sales Order. If you want to skip the shipment, uncheck the box and save the order - you will now be able to Generate an Invoice from the Sales Order.
The "Use Shipment" checkbox for using Shipments