Doc_events for child doc in hooks.py

I want to ask that can I have method call for child doc types in hooks.py?

1 Like

AFAIK it doesn’t work. I have tried with delete hook in child doctype and that did not work.

Still not possible. I just tried to use the before_save-hook with “Purchase Invoice Item” but to no avail.

Ok. as a work around, could try a hook method on parent doctype for on_update, on_cancel, on_delete etc… because logically when anything on the child happens, the parent is going to be changed.
I do not foresee a case where a child is modified and without the parent knowing about it. In your case, I suppose before_save of the parent would work.