Skip to Content
Odoo Menú
  • Registra entrada
  • Prova-ho gratis
  • Aplicacions
    Finances
    • Comptabilitat
    • Facturació
    • Despeses
    • Full de càlcul (IA)
    • Documents
    • Signatura
    Vendes
    • CRM
    • Vendes
    • Punt de venda per a botigues
    • Punt de venda per a restaurants
    • Subscripcions
    • Lloguer
    Imatges de llocs web
    • Creació de llocs web
    • Comerç electrònic
    • Blog
    • Fòrum
    • Xat en directe
    • Aprenentatge en línia
    Cadena de subministrament
    • Inventari
    • Fabricació
    • PLM
    • Compres
    • Manteniment
    • Qualitat
    Recursos humans
    • Empleats
    • Reclutament
    • Absències
    • Avaluacions
    • Recomanacions
    • Flota
    Màrqueting
    • Màrqueting Social
    • Màrqueting per correu electrònic
    • Màrqueting per SMS
    • Esdeveniments
    • Automatització del màrqueting
    • Enquestes
    Serveis
    • Projectes
    • Fulls d'hores
    • Servei de camp
    • Suport
    • Planificació
    • Cites
    Productivitat
    • Converses
    • Artificial Intelligence
    • IoT
    • VoIP
    • Coneixements
    • WhatsApp
    Aplicacions de tercers Odoo Studio Plataforma d'Odoo al núvol
  • Sectors
    Comerç al detall
    • Llibreria
    • Botiga de roba
    • Botiga de mobles
    • Botiga d'ultramarins
    • Ferreteria
    • Botiga de joguines
    Food & Hospitality
    • Bar i pub
    • Restaurant
    • Menjar ràpid
    • Guest House
    • Distribuïdor de begudes
    • Hotel
    Immobiliari
    • Agència immobiliària
    • Estudi d'arquitectura
    • Construcció
    • Property Management
    • Jardineria
    • Associació de propietaris de béns immobles
    Consultoria
    • Empresa comptable
    • Partner d'Odoo
    • Agència de màrqueting
    • Bufet d'advocats
    • Captació de talent
    • Auditoria i certificació
    Fabricació
    • Textile
    • Metal
    • Mobles
    • Menjar
    • Brewery
    • Regals corporatius
    Salut i fitness
    • Club d'esport
    • Òptica
    • Centre de fitness
    • Especialistes en benestar
    • Farmàcia
    • Perruqueria
    Trades
    • Servei de manteniment
    • Hardware i suport informàtic
    • Sistemes d'energia solar
    • Shoe Maker
    • Serveis de neteja
    • Instal·lacions HVAC
    Altres
    • Nonprofit Organization
    • Agència del medi ambient
    • Lloguer de panells publicitaris
    • Fotografia
    • Lloguer de bicicletes
    • Distribuïdors de programari
    Browse all Industries
  • Comunitat
    Aprèn
    • Tutorials
    • Documentació
    • Certificacions
    • Formació
    • Blog
    • Pòdcast
    Potenciar l'educació
    • Programa educatiu
    • Scale-Up! El joc empresarial
    • Visita Odoo
    Obtindre el programari
    • Descarregar
    • Comparar edicions
    • Novetats de les versions
    Col·laborar
    • GitHub
    • Fòrum
    • Esdeveniments
    • Traduccions
    • Converteix-te en partner
    • Services for Partners
    • Registra la teva empresa comptable
    Obtindre els serveis
    • Troba un partner
    • Troba un comptable
    • Contacta amb un expert
    • Serveis d'implementació
    • Referències del client
    • Suport
    • Actualitzacions
    Github Youtube Twitter Linkedin Instagram Facebook Spotify
    +1 (650) 691-3277
    Programar una demo
  • Preus
  • Ajuda
You need to be registered to interact with the community.
All Posts People Badges
Etiquetes (View all)
odoo accounting v14 pos v15
About this forum
You need to be registered to interact with the community.
All Posts People Badges
Etiquetes (View all)
odoo accounting v14 pos v15
About this forum
Ajuda

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

Subscriure's

Get notified when there's activity on this post

This question has been flagged
xmlstudio
1 Respondre
1384 Vistes
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
Descartar
Avatar
Sujata
Best Answer

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
Descartar
Enjoying the discussion? Don't just read, join in!

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

Registrar-se
Related Posts Respostes Vistes Activitat
Studio changes create a big mess in XML Solved
xml studio
Avatar
Avatar
1
de març 25
4433
How to activate XML Editor Solved
xml studio
Avatar
Avatar
2
de set. 20
14150
Odoo 19 Enterprise - Customer address in invoice header
invoice xml studio
Avatar
Avatar
1
de febr. 26
1230
readonly to a group and when the stage is in 2, 3, 4
xml studio odoo17
Avatar
Avatar
1
de juny 24
3295
How to automatically assign sequence numbers to records in a Studio-created model ✅ SOLVED
studio
Avatar
0
de juny 26
1293
Community
  • Tutorials
  • Documentació
  • Fòrum
Codi obert
  • Descarregar
  • GitHub
  • Runbot
  • Traduccions
Serveis
  • Allotjament a Odoo.sh
  • Suport
  • Actualització
  • Desenvolupaments personalitzats
  • Educació
  • Troba un comptable
  • Troba un partner
  • Converteix-te en partner
Sobre nosaltres
  • La nostra empresa
  • Actius de marca
  • Contacta amb nosaltres
  • Llocs de treball
  • Esdeveniments
  • Pòdcast
  • Blog
  • Clients
  • Informació legal • Privacitat
  • Seguretat
الْعَرَبيّة 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 és un conjunt d'aplicacions empresarials de codi obert que cobreix totes les necessitats de la teva empresa: CRM, comerç electrònic, comptabilitat, inventari, punt de venda, gestió de projectes, etc.

La proposta única de valor d'Odoo és ser molt fàcil d'utilitzar i estar totalment integrat, ambdues alhora.

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