Item Code customized auto increment

I’ve seen some different requests for help with auto-increment for ITEM CODES when creating an ITEM. I am looking for something a little different though.

I want to be able to create a regular item code OR an item code that has an auto incremented number attached to the end of it.

So I could create a regular code and just call it “STUFF” and have no numbers in it. But then on my next entry, I want to be able to enter the base code “STUFF” and check off a box for auto-increment and when I click save the ITEM would be “STUFF1”, then “STUFF2”.

It may be possible to also have it only automatically increment if it is a certain ITEM GROUP. So I can make a custom group and then set it up in such a way that if the ITEM GROUP is selected, it will then automatically add the numbers.

How could I achieve this?

You should be able to achieve this by using Naming series for Item code.
https://frappe.github.io/erpnext/user/manual/en/setting-up/settings/naming-series

Please note that in Stock setting please enable the “Item Naming By” as Naming Series.

Auto increment based on item group is not available as of now. As a workaround you can create naming series for Items groups and in Check the “User must always select Check box” there, so as when a Item code is generated user can selected the naming series based on Item Group.

Hope this helps.

Where do you find the “User must always select Check box”? I don’t see it anywhere. I already tried the Item Naming By Naming Series Trick, which would work very well; however, I need to be able to easily toggle it on and off from the item selection screen. It sounds like what you are saying is on the right track, but I can’t find the instance you are describing.

Another thought as well, is it possible to manipulate which number it starts with? As opposed to “1”, could it start at “35000” for example?

@jeff.fournier
Kindly refer the screenshot.

In current value you can enter the number from where you want the series to start.

Hope this helps.

I tried to select ITEM as a transaction from the series page, and then entered various Series such as “MF”, “MFA”, “MD”, “MDR”, “CDR” - which are all series I need to auto increment. I selected the check box for User must always select, but now I cannot create ANY items at all. I try to enter “MF” for an ITEM and then select the name and Type and click SAVE but I get a message saying “Value Missing for Series”, but there is no place to enter series. I don’t have something set up correctly somewhere.

UPDATE. It turns out I had to log off and log back in again for the changes to take effect. I see how it works now, and it would be okay, but the big issue is we need to be able to toggle that effect on and off as some items will not be serialized. I realize this is not currently a feature that is available, but I think we would be willing to sponsor it in order to get the effect we need. I am sure that others will be able to benefit from such a feature as well.

@jeff.fournier

Would you mind creating a github issue for this feature suggestion. You can mention about sponsoring and use case there itself.

Hi,

I have done the steps that was told in this topic, I use the naming series for creating new items. When I create a new item it asks for item code, please see the screenshot.

My question is; is there a way to autofill item code by the naming series system?

I solved this by disabling “Bold” option within “Customize Form” for “Item Code”

Best regards,
Mert

Hi,

I solved this by disabling “Bold” option within “Customize Form” for “Item Code”

Thank you.