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

This is my odoo 16 code. i want to convert this code to Odoo 17. i want to invisible this button using "invisible" property.


here is my xml code..


<button name="action_test" string="Request test"

                    type="object"

                    attrs="{'invisible': [('state', '!=', 'test2'), 'invisible':[('test_team_ids',

                    '!=',False)]}"

                    class="btn-primary"/>


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


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

Hi,

Here is the  updated code:


<button name="action_test" string="Request test" type="object"
        invisible="state != 'test2' or test_team_ids"
        class="btn-primary"/>


Hope it helps


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

invisible="state != 'test2' or test_team_ids"


For more reference you can search 'invisible=' in odoo17 base code you will get more ideas. 

Ảnh đại diện
Huỷ bỏ
Bài viết liên quan Trả lời Lượt xem Hoạt động
1
thg 10 24
1705
1
thg 4 25
2573
1
thg 3 25
2325
4
thg 8 24
3767
2
thg 5 24
7568