How to generate an unique code for every node
With some PHP knowledge, you can implemented the field using the Computed Field module. You can also use the module Universally Unique IDentifier. This does not require PHP knowledge, but does not store the code as a CCK field.