Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

how to add icon to a module on the menu of application?

Tags:

odoo-11

i'm using odoo 11 and i have installed open HRMS core which install a specific theme. After that i have installed another module which named overtime (bt_hr_overtime_automatic) to satisfy my needs but the problem is in the menu of the apps the new module doesn't has a icon and i want to add one(Ps: the module has a picture named "icon.png" in the folder /static/description/). Any idea on how to do that ?

enter image description here

enter image description here

like image 446
Dhouha Avatar asked Sep 16 '25 04:09

Dhouha


1 Answers

You must use "web_icon" in your menu to show your own icon. Save your icon in a directory. Size can be 256x256 File format should be .ico

Don't forget to upgrade your module after adding this code. Sometimes cache will show the old icon, if so try this in incognito mode or clear the cache

web_icon="your_module_name,static/description/icon.ico".

Example Code:

<menuitem name="Overtime" id="your_menu_id" action="your_action_id" web_icon="your_module_name,static/description/icon.ico"/>

Front End:

If you want to add it in front end Go to Settings-->Technical Settings-->Menu Item-->Your Menu-->Web Icon File Please refer screen shot

icon for menu in odoo

like image 160
sfx Avatar answered Sep 17 '25 18:09

sfx