I want to create a global filter which should apply on all list view and reports.

As I am creating a global filter and it should be applied on all doctypes when they are opened in list view or all the reports. Anyone can help me on this or who knows about filter mechanism in frappe or erpnext like how it how it works where it stores it’s filter data etc.

I think you should check this.

What is your business case? What is the global filter to be applied?

as i have set default company from session defaults now i want that every data should be filtered on basis of that company like if i have open sales invoice then i will only see sales invoices of that company only if i change session defaults data should be updated again.

From here I can set only session defaults.

You can try setting user default values on on_login hook.

frappe.defaults.set_user_default(fieldname, value, user)

1 Like