You can't hide the product code, but you can shrink it to 4 digit:
- Go to the Menu "Configuration / General information",
- Select option : "18. Display only 4 characters in the product code printed on the invoice",
When selecting to print only the last 4 digits of the product code on the invoice, the complete code will show in the order history and in the Point of Sale.