How To Add Icon Image For Custom Module in Odoo16

How To Add Icon Image For Custom Module in Odoo16

 How To Add Icon Image For Custom Module in Odoo16

To add an icon image for a custom module in Odoo 16, follow these steps:


  1. Create a folder named “static” in your custom module directory, if it doesn’t already exist.
  2. Inside the “static” folder, create a subfolder named “description” (i.e., “static/description”).
  3. In the “description” folder, add your icon image file. The file should be named “icon.png” and should be a PNG image file with a size of 128×128 pixels.
  4. In your module’s manifest file (i.e., “manifest.py”), add a line to specify the location of the icon file. For example, add the following line:
    ‘icon’: ‘static/description/icon.png’,
  5. Update your module in Odoo by going to the Apps menu and clicking on the “Update” button next to your module. This will reload your module and show the new icon image.

Note: If you want to use a different filename or file format for your icon image, you can specify it in the manifest file by changing the filename and file extension in the path. For example:

‘icon’: ‘static/description/myicon.png’,

Comments

No comments yet. Why don’t you start the discussion?

Leave a Reply

Your email address will not be published. Required fields are marked *