3.5 KiB
3.5 KiB
Module Icon
About the Icon
The module icon features five golden stars arranged in a pattern on a purple background (Odoo's brand color #875A7B). The icon visually represents the 5-star rating system that this module provides.
Files
- icon.svg: Vector format icon (scalable, editable)
- icon.png: Required PNG format for Odoo (needs to be created)
Converting SVG to PNG
Odoo requires a PNG icon file named icon.png with dimensions of 256x256 pixels.
Method 1: Using Inkscape (Recommended)
# Install Inkscape if not already installed
sudo apt-get install inkscape # Ubuntu/Debian
brew install inkscape # macOS
# Convert SVG to PNG
inkscape icon.svg --export-type=png --export-filename=icon.png --export-width=256 --export-height=256
Method 2: Using ImageMagick
# Install ImageMagick if not already installed
sudo apt-get install imagemagick # Ubuntu/Debian
brew install imagemagick # macOS
# Convert SVG to PNG
convert -background none -size 256x256 icon.svg icon.png
Method 3: Using Online Converter
- Go to https://cloudconvert.com/svg-to-png
- Upload
icon.svg - Set dimensions to 256x256
- Download the converted
icon.png - Place it in this directory
Method 4: Using GIMP
- Open GIMP
- File → Open → Select
icon.svg - Set import size to 256x256
- File → Export As →
icon.png - Save with default PNG settings
Method 5: Using Python (cairosvg)
# Install cairosvg
pip install cairosvg
# Convert
python3 << EOF
import cairosvg
cairosvg.svg2png(url='icon.svg', write_to='icon.png', output_width=256, output_height=256)
EOF
Icon Specifications
- Format: PNG
- Dimensions: 256x256 pixels
- Color Mode: RGB or RGBA
- Background: Can be transparent or solid
- File Size: Recommended < 50KB
Design Elements
The icon includes:
- Background: Purple (#875A7B) with rounded corners
- Decorative Circle: Light purple overlay for depth
- Five Stars: Golden stars (#FFD700) with orange outline (#FFA500)
- Text: "5 STARS" label at bottom in white
- Arrangement: Stars arranged in a visually appealing pattern
Customization
To customize the icon:
- Edit
icon.svgin a vector graphics editor (Inkscape, Adobe Illustrator, etc.) - Modify colors, shapes, or text as desired
- Save the SVG file
- Convert to PNG using one of the methods above
- Ensure the PNG is 256x256 pixels
Verification
After creating icon.png, verify it:
# Check file exists
ls -lh icon.png
# Check dimensions
file icon.png
# Should show: PNG image data, 256 x 256
# Or use ImageMagick
identify icon.png
# Should show: icon.png PNG 256x256 ...
Usage in Odoo
Once icon.png is created:
- Place it in
static/description/directory - Restart Odoo server
- Update the module
- The icon will appear in the Apps menu
Troubleshooting
Icon not showing in Odoo:
- Verify file is named exactly
icon.png(lowercase) - Check file is in
static/description/directory - Ensure dimensions are 256x256 pixels
- Clear browser cache
- Restart Odoo server
Icon looks blurry:
- Ensure PNG is exactly 256x256 pixels
- Use high-quality conversion method
- Check SVG source is clean and well-formed
File size too large:
- Optimize PNG with tools like
optipngorpngquant - Reduce color depth if possible
- Remove unnecessary metadata
Note: Until icon.png is created, Odoo will use a default placeholder icon for the module.