How can i change color in tree views?

(Carlos chicata) #1

In tryton, can i change color of tree/form views? and if answer is yes, how can i do?

(Nicolas Évrard) #2

It depends what you mean by “Can I change color of tree/form views”.

There are some customization through GTK theme.

But if you want some rows to be of a different color according to the value of a field, then you’ll have to use an icon instead of the color (this has been done for accessibility reasons).

(Carlos chicata) #3

how can i use icon? because that is i want to do

(Cédric Krier) #4

You have to put an affix (usually a prefix) with the attribute icon: Views — trytond 5.1 documentation

(Or a shortcut is to use the icon attribute on the field)

(Carlos chicata) #5

but those icon can be personalized or i must use the default icon of tryton?

(Nicolas Évrard) #6

You can define your own icons. Here’s how it’s done in the account module:

(Cédric Krier) #7

We should write a topic about icon in the documentation.