[SOLVED] Apps doc_events not listed in console

Hi guys,

I am trying to list all hooks through frappe.get_hooks(‘doc_events’)
First of all I log into console and use site called “testsite”

bench use testsite
bench console

Then I go for:

frappe.get_hooks('doc_events')

And get this:

u'Opportunity',
u'Quotation',
u'Sales Order',
u'Delivery Note',
u'Sales Invoice',
u'Supplier Quotation',
u'Purchase Order',
u'Purchase Receipt',
u'Purchase Invoice',
u'Project',
u'Issue'

Unfortunately no DocTypes(hooks) from my App which is installed and already configured.
Any tips much appreciated :slight_smile:

Hi @Marcin_Walkow,

Try frappe.get_hooks('doc_events', app_name='your_app_name')

Thanks, Makarand

Hi @makarand_b,

Thanks for the prompt reply - unfortunately it gives me empty list.
Not sure why it should return anything if non-filtered command (without app_name) is not returning hooks either.

Cheers,
Marcin

Hi @Marcin_Walkow,

Its working fine for me, can you please check again ?
please restart the bench console and try again.

Thanks, Makarand

Hi @makarand_b,

I am using ERPNext on the same site along with my App.
In the console when I type

frappe.get_hooks(app_name='erpnext')

I get all the ERPNext hooks, but when I go for

frappe.get_hooks(app_name='my_app')

I only receive info (name, version, author, license etc.) about it. I saw some other topic regarding ERPNext hooks “shadowing” other apps hooks.

Related topics:
https://discuss.erpnext.com/t/website-context-in-hooks-py-of-own-app-not-working/13757
https://discuss.erpnext.com/t/problem-with-hooks/11662/3

Issue is resolved - I have been trying to list hooks which were commented out thus not available.
Please close topic.