Help

3

What are the possibilities of decoration?

Avatar
Pieter Paulussen

Is there a list with all posibilities for the 'decoration-xxx' attribute for OdooV9? I noticed that full bootstrap support is not given (f.i.: decoration-bg-danger="xxx").

Is it possible to combine the conditional statements?

Example: decoration-info="(duration>5) and (duration<10)"

Is it therefore always necessary to define a state in the python file to be able to use the necessary decoration?

Avatar
Discard
2 Answers
14
Avatar
Ray Carnes
Best Answer

decoration-bf - shows the line in BOLD

decoration-it - shows the line in ITALICS

decoration-danger - shows the line in LIGHT RED

decoration-info - shows the line in LIGHT BLUE

decoration-muted - shows the line in LIGHT GRAY

decoration-primary - shows the line in LIGHT PURPLE

decoration-success - shows the line in LIGHT GREEN

decoration-warning - shows the line in LIGHT BROWN

You can review the RNG file defining the allowable XML tags and attributes at https://github.com/odoo/odoo/blob/9.0/openerp/addons/base/rng/view.rng


UPDATE:

As applied to Boolean fields:

<tree decoration-muted="scrapped == True" string="Stock Moves">
3 Comments
Avatar
Discard

Nice answer Ray! Just wondering: how could you use decorations in combination with boolean fields?

Avatar
Ermin Trevisan
-

Just for the record: when using different website themes, these colors may vary according to the theme settings.

and adding the required documentation page https://www.odoo.com/documentation/9.0/reference/views.html#lists https://www.odoo.com/documentation/9.0/howtos/backend.html#id3

-2
Avatar
MUHAMMAD Imran
Best Answer


decoration-bf - shows the line in BOLD 
decoration-it - shows the line in ITALICS
decoration-danger - shows the line in LIGHT RED
decoration-info - shows the line in LIGHT BLUE
decoration-muted - shows the line in LIGHT GRAY
decoration-primary - shows the line in LIGHT PURPLE
decoration-success - shows the line in LIGHT GREEN
decoration-warning - shows the line in LIGHT BROWN


Avatar
Discard