I have no idea of how write a custom function for report filter.
Example:
frappe.query_reports['Balance Sheet'] = {
filters: [
{
fieldname: 'company',
label: __('Company'),
fieldtype: 'Link',
options: 'Company',
default: frappe.defaults.get_user_default('company')
},
{
fieldname: 'periodicity',
label: __('Periodicity'),
fieldtype: 'Select',
options: [
'Monthly',
'Quarterly',
'Half-Yearly',
'Yearly'
],
default: 'Yearly',
depends_on: 'eval:doc.company=="Gadget Technologies Pvt. Ltd."'
}
]
}
Then Instead of this
options: [
'Monthly',
'Quarterly',
'Half-Yearly',
'Yearly'
],
I want to write a custom function example `get_term()" which is return the list […]
options: get_term(),