Override this method and set your naming series in it.
i name it by employee number
Have you done this by overriding the autoname
method?
no i just override the validation method by copy all the code and pased it then just change the status
as this said Last app will work what does it mean? - #2 by NCP
the naming by employee number will work just if i did oppesite the documentation ?!
mean if i reorder the hrms to be after my app !!
Same as this
So you mean to order like this?
- Frappe
- erpnext
- my_app
- hrms⌠etc
Then check your custom appâs customizations. Maybe in your custom appâs customizations, it is set as âEmployee naming series.â And if I remember correctly, you have set the employee name by employee number in HR settings?
yes
but now i create new site and from hr setting i but the name to be employee number every thing rn well
then i create new app and add property setter to add some else status for employee and i custom the validate method by override it in my app by add just the new status
then run migrate then restart the services but the naming does not work in but order
hrms then test_app the status worked and the naming not and in test_app then hrms the naming worked but the status not
this all code i add to custom
and this is the property setter
as you see in the Module (for export) i select module of my test app but i search about it in side app i did not find it?
i just add this in hook file
When I override the validate
function in employee
to add new cases, the autoname
function which exist in the employee doctype was called, even when the Employee Settings of Employee Naming By in the HR settings select the employee number. This behavior was contrary to the usual behavior that call the autoname method in employee master
. Therefore, the autoname
function was also override to resemble the usual behavior.
Thatâs what I said earlier ; itâs good that you found the solution .
yes i override it
but
i did not set my naming series
i could say i just change the behavior i did not set my naming series and i did not add any code as you offer and thx for your help all the time with your ideas and i learn form you a lot