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

Hello. I want to have my xpath customisations to take effect depending on the value of another boolean field. In other words, is it possible to show the default view of res.partner when a boolean is checked and the inherited and customised view when the boolean isn't checked. Every answer is appreciated, thank you.

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

Hi,

Showing or hiding the fields based on this boolean field will help ? If yes, you can easily achieve it using attrs in Odoo.


Sample: attrs="{'invisible': [('state', '!=', ('option'))]}"

Video: Conditionally Hide Fields in Odoo


Thanks

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

I don't think I can as I've manipulated the default fields in the view too. I think putting attrs would just make them invisible, not the way they were as default.

Ảnh đại diện
Huỷ bỏ
Bài viết liên quan Trả lời Lượt xem Hoạt động
1
thg 5 22
3474
2
thg 8 19
20045
1
thg 11 24
1619
5
thg 7 24
92870
1
thg 12 23
3035