Product code - auto generated and label printing

I have many products which do not have barcodes on them. I was wondering if its possible to have ERPnext auto generate a unique number for them? This would be nice for people who do not keep a product naming scheme because of the large amount of products, but just want the ERP to randomly generate a unique item product code for them.

Also for these same products is it possible to create a label printing template with the barcodes? The item product codes could be in a print friendly format to print and stick to the products that do not have any.