I have developed an app that I want to publish in the Odoo App Store. The issue I am now facing is how to add an Icon for it that will be seen in the Apps tab once the app is installed.
Asked
Active
Viewed 347 times
2 Answers
4
You should have that icon file anywhere in the static directory of your app/module. Why static? Because it is easier to configure web caching (with apache or nginx) if every app/module has static files at the "same" directory.
You also have to tell your menu which icon file to use, like in the Accounting App.
<menuitem name="Invoicing"
id="menu_finance"
groups="account.group_account_readonly,account.group_account_invoice"
web_icon="account,static/description/icon.png"
sequence="55" />

CZoellner
- 13,553
- 3
- 25
- 38
0
You can see in the module source code that Odoo will try to get the icon (icon.png
) from the static/description
directory:
def get_module_icon(module):
iconpath = ['static', 'description', 'icon.png']
if get_module_resource(module, *iconpath):
return ('/' + module + '/') + '/'.join(iconpath)
return '/base/' + '/'.join(iconpath)
Or use the default icon located in /base/static/description/icon.png
To add an icon to your module just add a file named icon.png
inside /MODULE_DIRECTORY/static/description/

Kenly
- 24,317
- 7
- 44
- 60