Order of hook being called


Does anyone know the order of hook being called ?
I am trying to override bootinfo variable by using boot_session in hooks.py, but it get overwritten.

From my test, the order of boot_session hook are :

  1. ERPNext
  2. My Custom App
  3. Frappe

Can we specify the order of hooks ?


Found the problem.

My initial goal was to overwrite bootinfo notes by using boot_session hook from custom app.
But it seems bootinfo notes initialized in frappe session.

So instead of using boot_session hook, I use extend_bootinfo hook which works for my case.

Order of the hooks : Frappe, ERPNext, custom apps …

Hi @SubhajitDey,

By the order, do you mean the priority or timely?
I mean if I have a custom app, it will take higher priority over ERPNext, or it will be loaded first so it will be overridden by ERPNext?

And how about if there are more than 1 custom apps?

Thank you

Its interested to me too as I am migrating master data from one site to another. I have data json for healthcare services unit and healthcare service units types. There is link field in healthcare Service unit type in healthcare service unit doc type.

I can transfer data through export fixtures through custom app but it gives error while migrating that xx service unit type and it throws error that not found healthcare serice unit type , though that is available in migrated service unit type . Though value does not exists in the db of site migrated.

What will be solution to tackle such a situation as I do not find solution except export to excel in one site and then import that excel in another site.

If any pointer , pls guide