Ir al contenido
Odoo Menú
  • Inicia sesión
  • Pruébalo gratis
  • Aplicaciones
    Finanzas
    • Contabilidad
    • Facturación
    • Gastos
    • Hoja de cálculo (BI)
    • Documentos
    • Firma electrónica
    Ventas
    • CRM
    • Ventas
    • PdV para tiendas
    • PdV para restaurantes
    • Suscripciones
    • Alquiler
    Sitios web
    • Creador de sitios web
    • Comercio electrónico
    • Blog
    • Foro
    • Chat en vivo
    • eLearning
    Cadena de suministro
    • Inventario
    • Manufactura
    • PLM
    • Compras
    • Mantenimiento
    • Calidad
    Recursos humanos
    • Empleados
    • Reclutamiento
    • Vacaciones
    • Evaluaciones
    • Referencias
    • Flotilla
    Marketing
    • Redes sociales
    • Marketing por correo
    • Marketing por SMS
    • Eventos
    • Automatización de marketing
    • Encuestas
    Servicios
    • Proyectos
    • Registro de horas
    • Servicio externo
    • Soporte al cliente
    • Planeación
    • Citas
    Productividad
    • Conversaciones
    • Inteligencia artificial
    • IoT
    • VoIP
    • Artículos
    • WhatsApp
    Aplicaciones externas Studio de Odoo Plataforma de Odoo en la nube
  • Industrias
    Venta minorista
    • Librería
    • Tienda de ropa
    • Mueblería
    • Tienda de abarrotes
    • Ferretería
    • Juguetería
    Alimentos y hospitalidad
    • Bar y pub
    • Restaurante
    • Comida rápida
    • Casa de huéspedes
    • Distribuidora de bebidas
    • Hotel
    Bienes inmuebles
    • Agencia inmobiliaria
    • Estudio de arquitectura
    • Construcción
    • Gestión de propiedades
    • Jardinería
    • Asociación de propietarios
    Consultoría
    • Firma contable
    • Partner de Odoo
    • Agencia de marketing
    • Bufete de abogados
    • Adquisición de talentos
    • Auditorías y certificaciones
    Manufactura
    • Textil
    • Metal
    • Muebles
    • Comida
    • Cervecería
    • Regalos corporativos
    Salud y ejercicio
    • Club deportivo
    • Óptica
    • Gimnasio
    • Especialistas en bienestar
    • Farmacia
    • Peluquería
    Trades
    • Personal de mantenimiento
    • Hardware y soporte de TI
    • Sistemas de energía solar
    • Zapateros y fabricantes de calzado
    • Servicios de limpieza
    • Servicios de calefacción, ventilación y aire acondicionado
    Otros
    • Organización sin fines de lucro
    • Agencia para la protección del medio ambiente
    • Alquiler de anuncios publicitarios
    • Fotografía
    • Alquiler de bicicletas
    • Distribuidor de software
    Descubre todas las industrias
  • Comunidad
    Aprende
    • Tutoriales
    • Documentación
    • Certificaciones
    • Capacitación
    • Blog
    • Podcast
    Fortalece la educación
    • Programa educativo
    • Scale Up! El juego empresarial
    • Visita Odoo
    Obtén el software
    • Descargar
    • Compara ediciones
    • Versiones
    Colabora
    • GitHub
    • Foro
    • Eventos
    • Traducciones
    • Conviértete en partner
    • Servicios para partners
    • Registra tu firma contable
    Obtén servicios
    • Encuentra un partner
    • Encuentra un contador
    • Contacta a un consultor
    • Servicios de implementación
    • Referencias de clientes
    • Soporte
    • Actualizaciones
    GitHub YouTube Twitter LinkedIn Instagram Facebook Spotify
    +1 (650) 691-3277
    Solicita una demostración
  • Precios
  • Ayuda
Debe estar registrado para interactuar con la comunidad.
Todas las publicaciones Personas Insignias
Etiquetas (Ver todo)
odoo accounting v14 pos v15
Acerca de este foro
Debe estar registrado para interactuar con la comunidad.
Todas las publicaciones Personas Insignias
Etiquetas (Ver todo)
odoo accounting v14 pos v15
Acerca de este foro
Ayuda

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

Suscribirse

Reciba una notificación cuando haya actividad en esta publicación

Se marcó esta pregunta
xmlstudio
1 Responder
1372 Vistas
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
Mejor respuesta

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
¿Le interesa esta conversación? ¡Participe en ella!

Cree una cuenta para poder utilizar funciones exclusivas e interactuar con la comunidad.

Registrarse
Publicaciones relacionadas Respuestas Vistas Actividad
Studio changes create a big mess in XML Resuelto
xml studio
Avatar
Avatar
1
mar 25
4423
How to activate XML Editor Resuelto
xml studio
Avatar
Avatar
2
sept 20
14129
Odoo 19 Enterprise - Customer address in invoice header
invoice xml studio
Avatar
Avatar
1
feb 26
1228
readonly to a group and when the stage is in 2, 3, 4
xml studio odoo17
Avatar
Avatar
1
jun 24
3294
How to automatically assign sequence numbers to records in a Studio-created model ✅ SOLVED
studio
Avatar
0
jun 26
1276
Comunidad
  • Tutoriales
  • Documentación
  • Foro
Código abierto
  • Descargar
  • GitHub
  • Runbot
  • Traducciones
Servicios
  • Alojamiento en Odoo.sh
  • Soporte
  • Actualizaciones del software
  • Desarrollos personalizados
  • Educación
  • Encuentra un contador
  • Encuentra un partner
  • Conviértete en partner
Sobre nosotros
  • Nuestra empresa
  • Activos de marca
  • Contáctanos
  • Empleos
  • Eventos
  • Podcast
  • Blog
  • Clientes
  • Legal • Privacidad
  • Seguridad
الْعَرَبيّة 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 es un conjunto de aplicaciones de código abierto que cubren todas las necesidades de tu empresa: CRM, comercio electrónico, contabilidad, inventario, punto de venta, gestión de proyectos, etc.

La propuesta única de valor de Odoo es ser muy fácil de usar y estar totalmente integrado.

Sitio web hecho con

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