In your seller account, from the "Home" tab, click on "Edit" on the line of the item you want to generate a code for.
Then in the middle of the page (under the first array with "stats" for your item), you again have some "tabs" for the object, click "Generate codes".