Se rendre au contenu
Menu
Cette question a été signalée
1 Répondre
7259 Vues

i am trying like this but not able to get colors.

<field name="state" widget="statusbar"
statusbar_visible="make_draft,draft,book,normal,close,sold,cancel,block,upcoming"
colors='{"draft":"red","make_draft":"red" "normal":"blue", "close":"red","sold":"green","cancle":"black"}'
options="{'clickable': '1', 'fold_field': 'fold','select':'1'}"/>
Avatar
Ignorer
Meilleure réponse

Guess 'colors' was removed from v8 onwards

https://github.com/odoo/odoo/issues/5987


Avatar
Ignorer

Try

<form string="allocation_form">

<style>

.o_form_view .o_form_statusbar > .o_statusbar_status > .o_arrow_button.btn-primary.disabled[data-value="draft"] {

background: blue;

}

.o_form_view .o_form_statusbar > .o_statusbar_status >

.o_arrow_button.btn-primary.disabled[data-value="draft"]::after {

border-left-color: blue;

}

.o_form_view .o_form_statusbar > .o_statusbar_status > .o_arrow_button.btn-primary.disabled[data-value = "cancel"] {

background: green;

}

.o_form_view .o_form_statusbar > .o_statusbar_status > .o_arrow_button.btn-primary.disabled[data-value =

"cancel"]::after {

border-left-color: green;

}

</style>

<header>

<field name="state" widget="statusbar" statusbar_visible="draft,cancel"/>

</header>

Publications associées Réponses Vues Activité
4
mai 24
12583
1
avr. 24
3226
0
nov. 23
1957
1
sept. 23
2061
2
août 23
4441