I have custom app which is overriding some function for monthly_attendance_sheet.py
which use Monkey Patching for python file, but in monthly_attendance_sheet.js
I want add some filter as well,
this is the original file structure:
frappe.query_reports["Monthly Attendance Sheet"] = {
"filters": [ ...
],
"onload": function() { ...
}
}
And I want to add following new items to the filters
section
{
"fieldname":"branch",
"label": __("Branch"),
"fieldtype": "Link",
"options": "Branch",
"default": frappe.defaults.get_user_default("Branch"),
"reqd": 0
},
{
"fieldname":"department",
"label": __("Department"),
"fieldtype": "Link",
"options": "Department",
"default": frappe.defaults.get_user_default("Department"),
"reqd": 0
},
If I edit the original file which is located in here /workspace/development/frappe-bench/apps/erpnext/erpnext/hr/report/monthly_attendance_sheet/monthly_attendance_sheet.py
it will works perfectly, but I need override that file by hooks.py
by using my custom app.
Any solution or idea
Thanks