Project naming series does not populate

Completely new to ERPNext and just installed it on Google Cloud to make sure it can do a few things before investing to much time.

I’m trying to add a naming series to Projects. I created a custom field with fieldname “naming_series”, Field Type “Select”.

I then went to Setup->Naming Series and entered the series list info “PRJ-.#”

If I go to create a project the naming series field shows up with “PRJ-.#” prefilled. When I save the project it save with “PRJ-.#” rather than “PRJ-1”.

Also when I go to the project DocType the naming series does not show up there as a field and I am unsure how to add it or if I even need to.

Again completely new to ERPNext and hoping someone can point me in the correct direction.

Thanks.

1 Like

Hi,
It’s ok, that you can’t see the naming series in project DocType and you shouldn’t change the Doctype, it’s better to use only Customize Form way.

In general it’s not possible to change naming series in standard doctype.

But you can try this method:

           go to your_host_name/desk#List/Property Setter/List
           create New
           set DocType or Field -> DocType
                 DocType -> Project
                 Property -> autoname
                 Set Value -> naming_series:
2 Likes

This does cause the naming series to generate the next number but it also sets that Project ID as the Title which I do not want.

I still want the project name to be the title in the same way that the employee module keeps the employee name as the title but generates an employee IS. I looked through some of the employee settings but couldn’t figure out how it was doing this.

Thanks again.

Is there any way to get the naming series for a project to update without also setting it as the Title? I looked for this information all weekend but have found nothing.

Thank you.

As I know yes, you can add new field and write a script which will create the naming series in that new field and willn’t set it as Title, but it needs backend script.

Are you saying I should use the property setter method you outline above and then write a script to overwrite that autoname or that I should write a script to set the naming series from the start. I was looking around the HR Employee module to see how it does it naming series (it seems to have the same behavior I am looking for) but could not figure it out. All the links on the site that I think will lead to the info on what the script should look like are broken and coming from drupal I am still trying to get my head around how all of this works.

I see a lot of mention of naming series being added to projects by default. Is there any time frame on this rollout?

Thank you

Hi,
Yes, partly. I’m saying about Customize Form, adding new field and python script which will make autoname.
In employee.py you can see autoname function with line

self.name = make_autoname(self.naming_series + ‘.####’)

which is used for making naming series.

Nope, I don’t have any news about time frame, you can check it in github issues.

Actually I was able to achieve this by doing the steps in post 1 & 2 and then, with developer mode enabled, changing the view setting for the title field to “project_name”.

Okay, this is a correction tom my last post for anyone else who is trying to accomplish the same thing. What I described above worked but I don’t think you are really supposed to change the DocType like I described above. You can accomplish the same thing without enabling developer mode or changing the DocType by going to Customize Form instead and adding “project_name” to the title field. Still learning my way around, sorry for the incorrect info.

1 Like