Sari la conținut
Odoo Meniu
  • Autentificare
  • Try it free
  • Aplicații
    Finanțe
    • Contabilitate
    • Facturare
    • Cheltuieli
    • Spreadsheet (BI)
    • Documente
    • Semn
    Vânzări
    • CRM
    • Vânzări
    • POS Shop
    • POS Restaurant
    • Abonamente
    • Închiriere
    Site-uri web
    • Constructor de site-uri
    • eCommerce
    • Blog
    • Forum
    • Live Chat
    • eLearning
    Lanț Aprovizionare
    • Inventar
    • Producție
    • PLM
    • Achiziție
    • Maintenance
    • Calitate
    Resurse Umane
    • Angajați
    • Recrutare
    • Time Off
    • Evaluări
    • Referințe
    • Flotă
    Marketing
    • Social Marketing
    • Marketing prin email
    • SMS Marketing
    • Evenimente
    • Automatizare marketing
    • Sondaje
    Servicii
    • Proiect
    • Foi de pontaj
    • Servicii de teren
    • Centru de asistență
    • Planificare
    • Programări
    Productivitate
    • Discuss
    • Artificial Intelligence
    • IoT
    • VoIP
    • Knowledge
    • WhatsApp
    Aplicații Terțe Odoo Studio Platforma Odoo Cloud
  • Industrii
    Retail
    • Book Store
    • Magazin de îmbrăcăminte
    • Magazin de Mobilă
    • Magazin alimentar
    • Magazin de materiale de construcții
    • Magazin de jucării
    Food & Hospitality
    • Bar and Pub
    • Restaurant
    • Fast Food
    • Guest House
    • Distribuitor de băuturi
    • Hotel
    Proprietate imobiliara
    • Real Estate Agency
    • Firmă de Arhitectură
    • Construcție
    • Property Management
    • Grădinărit
    • Asociația Proprietarilor de Proprietăți
    Consultanta
    • Firma de Contabilitate
    • Partener Odoo
    • Agenție de marketing
    • Law firm
    • Atragere de talente
    • Audit & Certification
    Producție
    • Textil
    • Metal
    • Mobilier
    • Mâncare
    • Brewery
    • Cadouri corporate
    Health & Fitness
    • Club Sportiv
    • Magazin de ochelari
    • Centru de Fitness
    • Wellness Practitioners
    • Farmacie
    • Salon de coafură
    Trades
    • Handyman
    • IT Hardware and Support
    • Asigurare socială de stat
    • Cizmar
    • Servicii de curățenie
    • HVAC Services
    Altele
    • Organizație nonprofit
    • Agenție de Mediu
    • Închiriere panouri publicitare
    • Fotografie
    • Închiriere biciclete
    • Asigurare socială
    Browse all Industries
  • Comunitate
    Învăță
    • Tutorials
    • Documentație
    • Certificări
    • Instruire
    • Blog
    • Podcast
    Empower Education
    • Program Educațional
    • Scale Up! Business Game
    • Visit Odoo
    Obține Software-ul
    • Descărcare
    • Compară Edițiile
    • Lansări
    Colaborați
    • Github
    • Forum
    • Evenimente
    • Translations
    • Devino Partener
    • Services for Partners
    • Înregistrează-ți Firma de Contabilitate
    Obține Servicii
    • Găsește un Partener
    • Găsiți un contabil
    • Meet an advisor
    • Servicii de Implementare
    • Referințe ale clienților
    • Suport
    • Actualizări
    Github Youtube Twitter Linkedin Instagram Facebook Spotify
    +1 (650) 691-3277
    Obține un demo
  • Prețuri
  • Ajutor
Trebuie să fiți înregistrat pentru a interacționa cu comunitatea.
Toate postările Oameni Insigne
Etichete (Vezi tot)
odoo accounting v14 pos v15
Despre acest forum
Trebuie să fiți înregistrat pentru a interacționa cu comunitatea.
Toate postările Oameni Insigne
Etichete (Vezi tot)
odoo accounting v14 pos v15
Despre acest forum
Suport

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

Abonare

Primiți o notificare când există activitate la acestă postare

Această întrebare a fost marcată
xmlstudio
1 Răspunde
1378 Vizualizări
Imagine profil
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
Imagine profil
Abandonează
Imagine profil
Sujata
Cel mai bun răspuns

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
Imagine profil
Abandonează
Îți place discuția? Nu doar citi, alătură-te!

Creează-ți un cont astăzi pentru a beneficia de funcții exclusive și a interacționa cu minunata noastră comunitate!

Înscrie-te
Postări similare Răspunsuri Vizualizări Activitate
Studio changes create a big mess in XML Rezolvat
xml studio
Imagine profil
Imagine profil
1
mar. 25
4427
How to activate XML Editor Rezolvat
xml studio
Imagine profil
Imagine profil
2
sept. 20
14140
Odoo 19 Enterprise - Customer address in invoice header
invoice xml studio
Imagine profil
Imagine profil
1
feb. 26
1229
readonly to a group and when the stage is in 2, 3, 4
xml studio odoo17
Imagine profil
Imagine profil
1
iun. 24
3295
How to automatically assign sequence numbers to records in a Studio-created model ✅ SOLVED
studio
Imagine profil
0
iun. 26
1282
Comunitate
  • Tutorials
  • Documentație
  • Forum
Open Source
  • Descărcare
  • Github
  • Runbot
  • Translations
Servicii
  • Hosting Odoo.sh
  • Suport
  • Actualizare
  • Custom Developments
  • Educație
  • Găsiți un contabil
  • Găsește un Partener
  • Devino Partener
Despre Noi
  • Compania noastră
  • Active de marcă
  • Contactați-ne
  • Locuri de muncă
  • Evenimente
  • Podcast
  • Blog
  • Clienți
  • Aspecte juridice • Confidențialitate
  • Securitate
الْعَرَبيّة 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 este o suită de aplicații de afaceri open source care acoperă toate nevoile companiei dvs.: CRM, comerț electronic, contabilitate, inventar, punct de vânzare, management de proiect etc.

Propunerea de valoare unică a Odoo este să fie în același timp foarte ușor de utilizat și complet integrat.

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