Skip to Content
เมนู
คุณต้องลงทะเบียนเพื่อโต้ตอบกับคอมมูนิตี้
คำถามนี้ถูกตั้งค่าสถานะ
1 ตอบกลับ
7254 มุมมอง

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'}"/>
อวตาร
ละทิ้ง
คำตอบที่ดีที่สุด

Guess 'colors' was removed from v8 onwards

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


อวตาร
ละทิ้ง

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>

Related Posts ตอบกลับ มุมมอง กิจกรรม
4
พ.ค. 24
12572
1
เม.ย. 24
3211
0
พ.ย. 23
1950
Blank White Page After log in to Odoo13 แก้ไขแล้ว
1
ก.ย. 23
2047
2
ส.ค. 23
4431