When I do customization, I often search the existing ERPNext code. I saw some thing
the other day which I would like to make sure that I understand it …
Clearly you can have your “on_submit” trigger-code on your doctype code. But I can also put that in the “hooks.py” file.
Which is best ?
My thoughts were …
If you want to add additional “on_submit” code to an existing doctype, then use
hooks.py. But it you are writing code for your own custom doctype , then its best to
place that code in the doctype-code ?