Bỏ qua để đến Nội dung
Menu
Câu hỏi này đã bị gắn cờ
3 Trả lời
34337 Lượt xem

In form view of sale order, I have a button

<button name="action_confirm" states="sent" string="Confirm Sale" class="btn-primary" type="object" context="{'show_sale': True}"/> 

and it's showing in blue color. if I change to oe_highlight nothing changes or any other class. How can I change this button to RED color?

Ảnh đại diện
Huỷ bỏ
Câu trả lời hay nhất

Hello

add class "btn-danger" into button for make the button color red.

Ảnh đại diện
Huỷ bỏ
Câu trả lời hay nhất

Hi,

try to add just style:

style="background-color:red;"
Ảnh đại diện
Huỷ bỏ
Câu trả lời hay nhất

Hello.

What you can do is to add an style sheet with a class and then make a reference to it with a link tag in an xml file, then load that xml in __manifest__ file of your module. 

Of course you should add that css class in class attribute of your button.

Ảnh đại diện
Huỷ bỏ
Bài viết liên quan Trả lời Lượt xem Hoạt động
2
thg 1 25
3025
0
thg 3 15
6332
2
thg 3 23
10068
2
thg 3 23
2466
1
thg 5 22
5195