Partner Logo Enrichment (Logo.dev)
by Gardas Udaykiran https://www.linkedin.com/in/udaykirangardas/
Partner Logo Enrichment (Logo.dev)
Automatically fetch and enrich Odoo 18 partner records with high-resolution company & brand logos from Website or Email domains — with a 1-click API connection tester, instant smart button, real-time save hooks, bulk server actions, and a 15-minute background cron queue.

Why this module
Turn grey placeholder avatars into a vibrant, recognizable address book — automatically and safely.
|
Smart domain extraction
Extracts and normalizes domains from the partner’s
website (stripping http://, https://, www., ports, and URL paths) or falls back to their email domain (@domain.com). |
1-Click API “Test Connection”
Verify your Logo.dev Publishable Key (
pk_...) right inside Settings → General Settings → Contacts. Auto-saves your key and shows a live green connection toast. |
|
Dual execution modes
Run in non-blocking Background Cron Mode (every 15 minutes in batches of 50) or enable Immediate Logo Fetch in Settings to enrich contacts the instant they are saved.
|
One-click “Fetch Logo” button
Adds a native Fetch Logo stat button directly inside the Partner Form button box whenever a website or email is present — with instant toast feedback and automatic view reload.
|
|
Bulk server action
Select dozens or hundreds of contacts in the Partner List view and click Action → Fetch Partner Logos to enrich existing records in one batch with a live summary toast.
|
404 infinite-loop protection
Tracks lookup status (
pending, fetched, not_found, failed) and clears the pending flag on HTTP 404 responses so unknown domains are never retried endlessly. |
|
Preserves existing custom avatars
Automatic
create(), write(), and cron hooks only fetch a logo when image_1920 is empty — never overwriting photos uploaded manually by your team. |
Auto-resized Odoo thumbnails
Writes directly to Odoo’s native
image_1920 field on res.partner, so image.mixin automatically generates image_1024, image_512, image_256, and avatar_128. |

See it in action
From testing your Logo.dev API key in Settings to one-click and bulk partner enrichment.

How it works
Four automated steps from domain parsing to high-resolution avatar generation.
|
1. Extract
Reads
website first (or falls back to email) and strips protocols, www., ports, and paths to isolate the clean domain. |
2. Verify & Query
Uses your verified
pk_... key to call https://img.logo.dev/{domain} with format=png, size=200, and a 10s timeout. |
3. Enrich
Base64-encodes the PNG binary into
image_1920, automatically computing all Odoo avatar thumbnails. |
4. Track Status
Sets
logo_fetch_status to fetched, not_found, or failed and clears logo_fetch_pending. |

Reliability, in detail
Engineered for real production databases — what actually happens under the hood.
|
✓1-Click API connection tester
Built-in action_test_logo_dev_connection() in Settings auto-persists your typed key and tests live connectivity against img.logo.dev.
|
✓Recursion-safe context guard
All internal updates use with_context(skip_logo_fetch=True) so writing image_1920 never re-triggers write() recursively.
|
|
✓Smart 404 handling
When Logo.dev returns HTTP 404, the partner is marked not_found and logo_fetch_pending=False to prevent endless cron retries.
|
✓Bounded 50-record cron batches
The 15-minute scheduled action processes up to 50 pending partners per run so worker threads never hit timeouts on large imports.
|
|
✓Multi-record & batch safe
Uses @api.model_create_multi and iterates recordsets safely in write() and action_fetch_logo() without singleton errors.
|
✓Instant UI toast & soft reload
Manual fetches return a display_notification client action chained with soft_reload so the new logo appears immediately.
|

You stay in control
Simple configuration under Settings → General Settings → Contacts.
| Setting / Component | What it controls | Default | Technical Key |
|---|---|---|---|
| Logo.dev API Key | Publishable key (pk_...) used to authenticate requests to img.logo.dev |
Empty | logo_dev.api_key |
| Test Connection Button | Auto-saves your typed API key, tests live connectivity to Logo.dev, and displays a toast notification | 1-Click Action | action_test_logo_dev_connection |
| Immediate Logo Fetch | Fetch logo synchronously during partner create() / write() instead of queueing for cron |
Disabled (False) |
logo_dev.fetch_immediate |
| Scheduled Cron Job | Processes pending partners (logo_fetch_pending=True) in background batches of 50 |
Every 15 mins | ir_cron_fetch_partner_logos |
| Partner Form Smart Button | One-click manual fetch button in the Partner Form top button box | Visible when domain set | action_fetch_logo |
| Bulk Server Action | Multi-record enrichment from Contacts List / Form Action menu | Enabled | action_fetch_partner_logos |

Up and running in 2 minutes
|
1
|
Install the module
Install Partner Logo Enrichment (Logo.dev) (
partner_logo_enrichment) from the Odoo Apps menu. |
|
2
|
Copy your free Logo.dev Publishable Key
Sign up for free at
logo.dev, open API Keys, and copy your Publishable Key (starts with pk_...). |
|
3
|
Paste & click “Test Connection” in Settings
Go to Settings → General Settings → Contacts, paste your
pk_... key into Logo.dev API Key, and click Test Connection to automatically save and verify your key with a green toast notification. |
|
4
|
Enrich any partner
Open any contact, enter a Website (e.g.
starbucks.com) or Email (e.g. info@stripe.com), and click the Fetch Logo smart button (or let auto-sync handle it). |
Requirements
| Odoo version | 18.0 — built and verified on Odoo 18.0 Community & Enterprise |
| Depends on | base, base_setup — standard core Odoo modules only |
| Extra Python packages | None — uses standard requests, base64, and urllib.parse included with Odoo |
| API Key | Free Logo.dev Publishable Key (pk_...) from logo.dev |
| Hosting | Odoo.sh or on-premise server with outbound HTTPS access to img.logo.dev |
| License / version | LGPL-3 · 18.0.1.0.0 |

Questions, answered
Click any question below to expand the answer.
How can I verify that my Logo.dev API key is working before enriching partners?
pk_... key and click the Test Connection button right underneath the input field. It automatically persists your key, performs a live test request against img.logo.dev, and shows a green “Connection Successful” toast notification.Which fields are mandatory on a partner to fetch a logo?
starbucks.com or https://www.stripe.com) or an Email containing a valid domain (e.g., info@starbucks.com or user@gmail.com). Website is checked first; if empty, the email domain is used.Which Logo.dev key should I paste — Publishable (pk_) or Secret (sk_)?
pk_...). Logo.dev’s image CDN endpoint (https://img.logo.dev/{domain}?token=pk_...) is designed specifically for publishable tokens.Will automatic enrichment overwrite a photo I already uploaded?
create(), write(), and the 15-minute cron job strictly checks if not partner.image_1920 first. Only clicking the manual Fetch Logo button or running the bulk action intentionally refreshes the image.What happens if a company’s domain has no logo on Logo.dev (HTTP 404)?
logo_fetch_status = 'not_found' and logo_fetch_pending = False. This ensures the background cron job never wastes API calls retrying missing domains in an infinite loop.How do I enrich hundreds of existing partners at once?
What’s new
- Automatic domain extraction and normalization from partner
websiteandemailfields - Logo.dev API integration writing high-resolution PNGs directly to
res.partner.image_1920 - Configurable Logo.dev API Key, 1-click Test Connection button, and Immediate Logo Fetch toggle in General Settings → Contacts
- One-click Fetch Logo smart button on the Partner Form view with toast feedback and
soft_reload - Multi-record Fetch Partner Logos server action bound to the Partner List and Form Action menu
- 15-minute scheduled cron job processing queued partners in bounded batches of 50 with 404 loop protection

Built by
Connect for free customizations, collaboration, or explore more Odoo 18 apps from the same author.
I build and publish open-source Odoo 18 apps — Contacts enrichment, Point of Sale tools, and login security. All of them are on the Odoo Apps Store and in one GitHub repository.
|
GitHub Repository (Copy URL)
github.com/udaykiran712/uday_odoo_apps
|
LinkedIn Profile (Copy URL)
linkedin.com/in/udaykirangardas
|
|
Email OTP Login
Password-less login for Odoo 18 with hashed one-time email codes, rate limiting, group policies, and a live security dashboard.
View on Odoo Apps →
|
POS Product Stock & Price Display
Display dynamic sales price and real-time, location-specific stock on-hand directly on the Point of Sale product card with an out-of-stock blocker.
View on Odoo Apps →
|
|
POS User Access Restriction
Restrict POS users to specific Point of Sale shops or registers in Odoo 18 with enforced record rules.
View on Odoo Apps →
|
POS Auto Lot/Serial Selection
Automatically assigns the oldest lot/serial (FEFO/FIFO) in Point of Sale without popup interruptions.
View on Odoo Apps →
|
Partner Logo Enrichment (Logo.dev) · v18.0.1.0.0 · LGPL-3 · © Gardas Udaykiran
| Availability |
Odoo Online
Odoo.sh
On Premise
|
| Lines of code | 355 |
| Technical Name |
partner_logo_enrichment |
| License | LGPL-3 |
| Website | https://www.linkedin.com/in/udaykirangardas/ |
Please log in to comment on this module
There are no ratings yet!