This article describes the setting when you don't want a barcode to be printed on labels for cancelled products.
-> Extra -> Settings
-> Section: Products -> Tab Default values

The setting "PrintLabel_HideBarcodeWhenProductIsCancelled" needs to be set on "Yes".