Remove Help Menu from ERPNEXT

Hello,

How to disable help menu from ERPNEXT.

comment out the code from line 49 to line 65 and then after that build the bench.

3 Likes

Thanks for your reply …

I am not getting meaning of then after that build the bench.

He means the command bench build.

However, the approach should always be to not modify the core files. If you modify the core files like this they will get overwritten with the next update and/or you will have problems when updating in the first place.

Better create a custom-app and add custom-css to that app which hides the help menu, e.g.

li.dropdown.dropdown-help.dropdown-mobile {
    display: none;
}

2 Likes

Hey @ARAGATO, thanks for the explanation, can you let me know in which folder I should put the files?

Thanks

The command for creating a custom app ist bench new-app {app_name}.
In your custom app folder you will find a file called hooks.py. There you can add your CSS-File.

I recommend having a look at the official frappe app development tutorial in order to get a better grasp of how a custom app works.
https://frappe.io/docs/user/en/tutorial

1 Like

Thanks, I’ve created my apps, but I didn’t know where to put the css file. Do I put the CSS lines inside hooks.py or do I put files.css alongside hooks.py?

Please have a look at the hooks.py.
In it you will find examples of how to implement your css files.
You just have to uncomment out the appropriate line and create that css file and fill it.

Thanks!

Hello, did you manage to remove the help menu?

One way to hide it without creating a new app or modifying core css files is to add it to your default print style (found in print settings). Not its intended usage but doesn’t require server access.

.dropdown-help {
display: none !important;
}

to remove permanently.

two files for this.

/home/frappe/frappe-bench/apps/erpnext/erpnext/public/js/conf.js remove links and change links according to your requirement

another file is

/home/frappe/frappe-bench/apps/erpnext/erpnext/public/js/help_links.js

if you want to add a new menu in help links in your custom doc

create help_links.js in public js folder of your custom doc

frappe.provide('frappe.help.help_links');

const docsUrl = 'https://erpnext.com/docs/';

frappe.help.help_links['List/Property Sales'] = [
	{ label: 'Video Tutorial', url: docsUrl + '#' },
]

frappe.help.help_links['Form/Property Sales'] = [
	{ label: 'Video Tutorial', url: docsUrl + '#' },
]

add add this help_link.js in your custom doc hook

app_include_js = "/assets/property_sales/js/help_links.js"

if still any issue contact me : pratikcws@gmail.com

1 Like

@Pragya_Rohilla I was able to solve these pretty easy with a help of a comment I randomly saw in the forum.

Generally the steps involved are:

  • Create a custom app, run:
    bench new-app
  • On the custom app, edit the hooks.py file and un-comment or enable the app_include_css. In my case:
    From this: # app_include_css = "/assets/common_customizations/css/common_customizations.css"
    To this app_include_css = "/assets/common_customizations/css/common_customizations.css"
  • On the custom app, create a new file inside the public/css folder with filename [custom_app].css. Replace the filename of the css depending on the value inside the hooks.py file.
  • Install the app on the site you want to effect it. bench --site sample.site.com install-app custom_app. Replace sample.site.com and custom_app accordingly.
  • In development, just run bench start again
  • In production mode, you need to run bench clear-cache

Hope it helps. :grin:

ref,

2 Likes

In case somebody stumbles on this thread looking to customize the help dropdown, you can do so in Navbar Settings, without modifying any code.

You can rename or hide dropdown items, add your own with custom links, etc.

2 Likes