Any triggers on Doc creation?

I have some code (python) in my custom app that should be triggered when docs are created in another app (Quotation for instance).

Any easy way to do this?

On insert Controllers

I would need to have this inside my code app, so Controllers of ERPNext won’t work.

So I have hooked this up in hooks.py

doc_events = { "*": { "on_update": "my_app.my_py_file.my_py_method", # "on_cancel": "method", # "on_trash": "method" } }

Since I wanted to control which Doc Type I need notification for, I am just handling that in my method by complimenting it with the Settings file.

Its one of those, struggle for a day, post the question and figure out quickly after thing.

I wanted to give you the direction to controllers. You can specify the doctype you want the notification for in the hooks itself rather than a “*”. check the docs Hooks.