Try ERPNext Try Frappe Cloud Buy Support Partners Foundation

Item naming series based on selected group

Hi,
I want that ERPNext uses naming series from item group.
Every group will have own series(eg. Group 1 has series 001…####, Group 2 has series 002…####).

In item group doc I’ll set naming series field where user will select naming series from select list.
What should I do in Item doctype?
Thanks

Anyone?

I think a good place to put code for this is in the python item controller’s def autoname:

I’m not sure which frappe function to use.
I believe it can be done from UI, with scripts.

Have you tried achieving this via Document Naming Rule:

For naming series, a straight forward client script should do the trick.

Sorry, I don’t use v13.

Customize Item Doctype

Naming Series.

Checked : user must always select

Create Group with Code No ie. Raw Material - 01

Add New Item
image

Okey, but I want to hide Series field while creating the item.
Client should pick selected series from item group. So when I select item group, client automatically selects series.
Only I don’t know is what should I write to client script