Frappe Cloud Support Partners Foundation Frappe School

How to hide the 'add column' button on the menu when I view the report?

however I can’t find where the button ‘add column’ is? if I can find it, maybe I can make a script to hide it, but I really don’t know what file name is and what does this button belong to?
Can you give me some suggestion?

share a screen for the button itself

when you view the report, at the top-right, you can find the button ‘Menu’(show as ‘…’), then click it you can find the button ‘add column’ in the list, like below in blue

right click , inspect element and find out it’s id or class .

i am not sure if this is what you mean, but what shall I do?

is that the button that says edit columns , I dont speak Chinese/Japanese :slight_smile: . but it’s does not look the same . the right click should be at the hide columns button . the button you just showed doesn’t have a class we can target

yes I think the English name of the button should be edit columns, where is it? Can it be hidden?

Hi Sir, I have some problem on the ‘download’ button, I hid it by the way you taught me, but sometimes it appear when I open the document, when I refresh the page it will disappear, however maybe next time it will appear again, so why did it happen?

it happens because the code is slowly running . and it’s a client side code so it happens after the page is loaded . maybe we should find another way to do this

if I reload the page by hand, the button will disappear, and shall I add some code to reload the page once when I open the page?

I tried to add code as below, so the page can be reloaded but can’t stop, so how can I reload the page automatic only 1 time?


I don’t get it . why do you want to reload the page ?

because when I reload/refresh the page by hand, the button disappear immediately, I think the code works, but if I don’t reload the page, the botton stay there and will not be removed

okay , I will try to find another way to hide it .

Thank you very much!

I add code ‘lcation.reload();’ under the code you taught me before, now the page can be reloaded but it reload again and again, it can’t stop, I think I shall make the reloading only 1 time, how can I do it?

bro , I still don’t understand what is happening with you. what reloading are you talking about .

I mean the ‘reload’ is to refresh the page just like click the button as QQ%E5%9B%BE%E7%89%8720220115110706
when I click this button, the page will reload all data from the server, then the button which I want to hide will disappear, but if I don’t click the refresh button QQ%E5%9B%BE%E7%89%8720220115110706 , even I add the code which you taught me before, the button can only be hidden in the first openning document (such as delivery note), then if I change to open other document (such as purchase receipt), it will appear on the old place
so I want to add some code to make the page refresh one time automatic when I open the document page