How to run a py method on the server side every time saved is clicked on a doctype ?
Check validate under CRUD Events in → Hooks