Přejít na obsah
Odoo Menu
  • Přihlásit se
  • Vyzkoušejte zdarma
  • Aplikace
    Finance
    • Účetnictví
    • Fakturace
    • Výdaje
    • Spreadsheet (BI)
    • Dokumenty
    • Podpisy
    Prodej
    • CRM
    • Prodej
    • POS Obchod
    • POS Restaurace
    • Předplatné
    • Pronájem
    Webové stránky
    • Webové stránky
    • E-shop
    • Blog
    • Fórum
    • Živý chat
    • eLearning
    Dodavatelský řetězec
    • Sklad
    • Výroba
    • PLM
    • Nákup
    • Údržba
    • Kvalita
    Lidské zdroje
    • Zaměstnanci
    • Nábor
    • Volno
    • Hodnocení zaměstnanců
    • Doporučení
    • Vozový park
    Marketing
    • Marketing sociálních sítí
    • Emailový marketing
    • SMS Marketing
    • Události
    • Marketingová automatizace
    • Dotazníky
    Služby
    • Projekt
    • Časové výkazy
    • Práce v terénu
    • Helpdesk
    • Plánování
    • Schůzky
    Produktivita
    • Diskuze
    • Umělá inteligence
    • IoT
    • VoIP
    • Znalosti
    • WhatsApp
    Aplikace třetích stran Odoo Studio Odoo cloudová platforma
  • Branže
    Maloobchod
    • Knihkupectví
    • Obchod s oblečením
    • Obchod s nábytkem
    • Potraviny
    • Obchod s hardwarem
    • Hračkářství
    Jídlo a pohostinství
    • Bar a Pub
    • Restaurace
    • Fast Food
    • Penzion
    • Distributor nápojů
    • Hotel
    Nemovitost
    • Realitní kancelář
    • Architektonická firma
    • Stavba
    • Správa nemovitostí
    • Zahradnictví
    • Asociace vlastníků nemovitosti
    Poradenství
    • Účetní firma
    • Odoo Partner
    • Marketingová agentura
    • Právník
    • Akvizice talentů
    • Audit a certifikace
    Výroba
    • Textil
    • Kov
    • Nábytek
    • Jídlo
    • Pivovar
    • Korporátní dárky
    Zdraví a fitness
    • Sportovní klub
    • Prodejna brýli
    • Fitness Centrum
    • Wellness praktikové
    • Lékárna
    • Kadeřnictví
    Transakce
    • Údržbář
    • Podpora IT & hardware
    • Systémy solární energie
    • Výrobce obuvi
    • Úklidové služby
    • Služby HVAC
    Ostatní
    • Nezisková organizace
    • Agentura pro životní prostředí
    • Pronájem billboardů
    • Fotografování
    • Leasing jízdních kol
    • Prodejce softwaru
    Procházet všechna odvětví
  • Komunita
    Edukační program
    • Tutoriály
    • Dokumentace
    • Certifikace
    • Vzdělávání
    • Blog
    • Podcast
    Podpora vzdělávání
    • Vzdělávací program
    • Scale Up! Hra na firmu
    • Navštivte Odoo
    Získat software
    • Stáhnout
    • Porovnejte edice
    • Verze
    Spolupráce
    • Github
    • Fórum
    • Události
    • Překlady
    • Stát se partnerem
    • Služby pro partnery
    • Registrujte svou účetní firmu
    Získat služby
    • Najít partnera
    • Najít účetní
    • Setkejte se s poradcem
    • Implementační služby
    • Zákaznické reference
    • Podpora
    • Upgrady
    Github Youtube Twitter Linkedin Instagram Facebook Spotify
    +1 (650) 691-3277
    Dohodnout demo
  • Ceník
  • Pomoc
You need to be registered to interact with the community.
All Posts Lidé Odznaky
Štítky (View all)
odoo accounting v14 pos v15
O tomto fóru
You need to be registered to interact with the community.
All Posts Lidé Odznaky
Štítky (View all)
odoo accounting v14 pos v15
O tomto fóru
Pomoc

How can i decorate or customize badge widget using Odoo: Studio ONLY

Odebírat

Get notified when there's activity on this post

This question has been flagged
xmlstudio
1 Odpovědět
1393 Zobrazení
Avatar
Happy Hoister Inc, Anton

Hi,


I created a selection field inside the form-view using Studio. 
Now, I added the field in list-view, and then I set the widget as a badge. But, no matter what the data is, it only shows the color grey. How can I customize the color based on what data are chosen and add a Font Awesome icon in the text? 


We are in Odoo Online, so we don't have access to backend.

0
Avatar
Zrušit
Avatar
Sujata
Nejlepší odpověď

Hi Anton, 

1️⃣ Why the badge is always grey & how to set colors dynamically

When you use a selection field with the badge widget in a list view, Odoo does not automatically color it based on the selected value.

If no color configuration is provided, the badge defaults to grey.

✅ Correct way to customize badge colors

To control badge colors, Odoo needs an integer field that represents the color index.

Steps (Studio-friendly approach)
  1. Selection field

    • Example:

      • Field name: x_status

      • Type: Selection

      • Values:

        • draft

        • confirmed

        • done

  2. Integer color field

    • Create another field:

      • Field name: x_status_color

      • Type: Integer

  3. List view configuration

    • Add the selection field to the list view

    • Set:

      • Widget → badge (or selection_badge)

      • Color Field → x_status_color

  4. Define color values

    • Odoo uses color indexes (same system used everywhere, like CRM stages)

    • Example:

      • Grey → 0

      • Green → 10

      • Blue → 4

      • Red → 1

      • Orange → 3

Example mapping
StatusColor field value
Draft0 (Grey)
Confirmed4 (Blue)
Done10 (Green)
Automating the color assignment

To avoid manual updates:

  • Use Automated Actions (Studio → Automation)

  • Trigger: On creation & update

  • Condition: based on the selection value

  • Action: set x_status_color accordingly

📌 Reference for better understanding: Check the Stage color field in the CRM pipeline — it uses the exact same concept.

2️⃣ Adding a Font Awesome icon inside the badge text

Odoo does not support Font Awesome icons inside selection labels (or badges) by default.

Selection values are treated as plain text, not HTML.

What can be done
  • There is no standard widget in Studio to inject Font Awesome icons into a badge

  • To achieve this, you would need:

    • A custom widget (JavaScript)

    • Or a custom QWeb view override

This requires development work, not achievable with Studio alone i guess. in case you find any solution let us know 

Possible workaround (limited)
  • Use emoji in the selection label (e.g. ✅ ❌ ⚠️)

  • Emojis are supported and render correctly in badges

2
Avatar
Zrušit
Enjoying the discussion? Don't just read, join in!

Create an account today to enjoy exclusive features and engage with our awesome community!

Přihlásit se
Related Posts Odpovědi Zobrazení Aktivita
Studio changes create a big mess in XML Vyřešeno
xml studio
Avatar
Avatar
1
bře 25
4444
How to activate XML Editor Vyřešeno
xml studio
Avatar
Avatar
2
zář 20
14173
Odoo 19 Enterprise - Customer address in invoice header
invoice xml studio
Avatar
Avatar
1
úno 26
1240
readonly to a group and when the stage is in 2, 3, 4
xml studio odoo17
Avatar
Avatar
1
čvn 24
3300
How to automatically assign sequence numbers to records in a Studio-created model ✅ SOLVED
studio
Avatar
0
čvn 26
1322
Komunita
  • Tutoriály
  • Dokumentace
  • Fórum
Open Source
  • Stáhnout
  • Github
  • Runbot
  • Překlady
Služby
  • Odoo.sh hostování
  • Podpora
  • Upgrade
  • Nestandardní vývoj
  • Edukační program
  • Najít účetní
  • Najít partnera
  • Stát se partnerem
O nás
  • Naše společnost
  • Podklady značky
  • Kontakujte nás
  • Práce
  • Události
  • Podcast
  • Blog
  • Zákazníci
  • Právní dokumenty • Soukromí
  • Zabezpečení
الْعَرَبيّة Català 简体中文 繁體中文 (台灣) Čeština Dansk Nederlands English Suomi Français Deutsch हिंदी Bahasa Indonesia Italiano 日本語 한국어 (KR) Lietuvių kalba Język polski Português (BR) română русский язык Slovenský jazyk Slovenščina Español (América Latina) Español Svenska ภาษาไทย Türkçe українська Tiếng Việt

Odoo je balíček open-source aplikací, které pokrývají všechny potřeby vaší společnosti: CRM, e-shop, účetnictví, sklady, kasy, projektové řízení a další.

Unikátní nabídka od Odoo poskytuje velmi jednoduché uživatelské rozhraní a vše je integrované na jednom místě.

Website made with

Odoo Experience on YouTube

1. Use the live chat to ask your questions.
2. The operator answers within a few minutes.

Live support on Youtube
Watch now