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

Is there any way to show/hide page in the odoo form when button is clicked ?

There is a page in my contact form I want to hide or show based on button click.

I don't want to use attribute method or any xpath.

Just click button page show up and click that button again it will hide. 

Does JS can be written in Odoo form for this process?

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

I use Odoo v12 and I tried this syntax and it worked :


<page name="input" string="Input" autofocus="autofocus" attrs="{'invisible': [('type', '!=', 'input')]}">


I found also this post : https://www.odoo.com/fr_FR/forum/aide-1/how-to-invisble-a-notebook-page-only-for-specific-users-90368 where the solution is to modify the python code but it seems to be not required, at least in my case !

Ảnh đại diện
Huỷ bỏ
Bài viết liên quan Trả lời Lượt xem Hoạt động
1
thg 3 15
3875
0
thg 3 15
4751
1
thg 8 22
4585
1
thg 5 20
4293
2
thg 2 20
5927