1
votes

In OpenERP Web 6.1 the modules Kanban view presents an icon for each of the apps. How do you add a module icon to a custom developed module. I have tried to add an image at mymodule\static\src\img\icon.png, but it looks like this is not enough.

4

4 Answers

2
votes

In the __openerp__.py file of your module add 'application':True and then as you mentioned add the image (64x64 pixel) to yourmodule/static/ing/icon.png , Now Restart the server.

1
votes

in odoo v8 you can add icon in folder addons/your_module/static/description/icon.png

for example you can find icon for module employe in \openerp\addons\hr\static\description\

0
votes

I have made the same exercise in my local.

but its working fine @ my side.

You can Find where exactly the problem is by tracing the file: server/openerp/modules/module.py

There is a function

def get_module_icon(module):

if this function return the vealue like: yourmodule/static/src/img/icon.png then its ok from your side.

Also run the "Update Module List" wizard.

plz take the latest revision of webclient.

hope this can help you.

0
votes

As of openERP 7.0, you can change the icon by editing your module's __openerp__.py file to have a key icon set to the path to your icon without having to follow much conventions, although it needs to be under /static directory. As in:

{
  'name': 'Some Module Name',
  'icon': "/{my_module_name}/static/img/some_icon.png",
  ...
}

The path is like this because it will be used as the value of <img>'s src= attribute.

<img class="oe_module_icon" src="/{my_module_name}/static/img/some_icon.png">