Generating Lot number and barcode

I would like to get help in creating a lot number and barcode