Ir al contenido
Menú
Se marcó esta pregunta
1 Responder
6909 Vistas

If you created a custom model for your tags, and let's say you would like each of your tag to have a color. Well, it's doable.

Avatar
Descartar
Autor Mejor respuesta

Let's start with an example: you want to add tags on SO (marketing, service, or whatever)



STEP 1 (https://youtu.be/5o-UDIw78A8)

1. Create a M2M relation between SO and a new model (SO Tags)

2. Add the menu of your new model in Odoo

3. Go to this new model and add an integer number to this model



STEP 2 (https://youtu.be/xQicQmpMbuY)

4. Edit the form view of the SO

5. Go to the studio inherited view and find your M2M field and add this piece of code: options="{'color_field': 'x_studio_color', 'no_create_edit': True}"


The same can apply in the kaban view ;)

FYI the ID's colors:



Avatar
Descartar

Great instruction Maureen.

What code would I add if I would like to set a default tag color. It does not have to be editable.

Best Regards,
Rickard

Publicaciones relacionadas Respuestas Vistas Actividad
0
abr 21
4
1
abr 21
2351
1
may 21
2168
1
abr 21
8
1
may 21
3326