When creating a product you have option of adding a product code. The product code is only for internal reference and isn't displayed anywhere on the customers invoices. This guidance advises on a workaround for this.
Adding to the Description
To show your product code on invoices, go to Sales > Sales Types > Select the Sales Type > Select the Product > Tick the box for auto-enter details. Using the description box, enter in your product code here, this description will be entered whenever this product is selected. When ready, click Update.