I added action to the menu using below script it while it is working in list view it does not work in report view, do I need to create it separately for report view, if so how do i do that?
frappe.listview_settings['Purchase Receipt'].onload = function(listview) {
// add button to menu
listview.page.add_action_item(__("Create Invoice"), function() {
console.log("Clicked")
});
};