I don’t want my staffs to see everything through ‘add column’ button on the menu when he view the report, so how can I hide this button?
provide a screenshot pelase
you can create a custom script on sales order . get the button by it’s class name and hide it using simple js code
I have tried this way but can’t work, is it to create a from script of sales order?
is the script like below?
frappe.ui.form.on(‘Sales Order Item’, {
refresh(frm) {
frm.remove_custom_button(__(‘download’));
// your code here
}
})
I don’t know if download is considered as custom button , but try this :
frappe.ui.form.on('Sales Order', {
refresh(frm) {
document.getElementsByClassName('grid-download')[0].style.display="none";
}
})
yes it works, thank you very much!!
another question, for the same reason, I want to hide the “add column” in manu on the query report, can you teach me how to do?
if you want the user not to update a report you can use prepared reports. prepared reports cannot be edited.
how to use the prepared report? shall I create a new report?
open report list. then your report . uncheck “disable prepared reports” . now open the report and generate new one
it already uncheck “disable prepared reports”, then shall I create a all new report?
you can create a new prepared report yes.
I can’t find where to create the prepared report
when you go to report you should see a button “create new prepared report”
because it already uncheck “disable prepared reports”, there is no way to select the report as prepared report
I don’t find this button, is it in the query report?
Hi, I tried many ways by what you said yesterday but all can’t reach my target, even I create new prepared report, but when I query it, I still can add or remove the column without any limit, so can I hide the button ‘add column’ directly? How can I do?
I suppose do it the same way you did the other button , for now