Server script (.py file ) problem

“I created a server script for a DocType in both ERPNext version 15 and version 14. In version 15, it works properly, but in version 14, it does not work. The above-mentioned script was created using the following steps: first, I created a submittable DocType. Then, through the terminal (~/frappe-bench/apps/hrms/hrms/hr/doctype/“new doctype”$ nano “new doctype.py”), I wrote a server script in .py file . In version 15, it works, but in version 14, it doesn’t. Then, I purposely added a syntax error to the Python code to reflect the error, but it did not show any error. I then realized that the server script is not reflecting the corresponding DocType in version 14. Please give me a solution for that.”
give a subject for the above detailing

Did you push it to your app?

https://frappeframework.com/docs/user/en/tutorial/create-an-app

Hi,
I hadn’t created custom app. I had created a new Doctype in HR module in ERPNext. In that, I had coded a server script via frappe bench in that respective doctype itself.
Thanks,
Divyasree K