Naming Series for Item Code Possible?

Hi! I’ve been struggling to grasp how to name documents using a naming series. I’ve spent several hours trying to figure it out and haven’t made much progress.

In this case, I am trying to use a naming series for items to generate item codes with format CP-.#####

I have tried every combination I can find of the standard naming series (found in Document Naming Settings), Document Naming Rules and even setting the form settings to just generate a random hash. None of them work.

It seems like the issue is that in the DocType Item, the naming settings are set to the item_code fieldname, so settings I change elsewhere (such as customize form) are getting overwritten by the doctype settings, which I can’t edit.

Is it possible to generate custom item codes? If so how?

(on V16.9 of ERPNext running on Frappe Cloud)

@glewis

Plz check Stock Settings.