Task:
Initially the attachment button is visible to everyone, but If a checkbox is tick (True).
The button should only be visible to a certain group.
I tried putting the group on the 'groups' parameter of the button and it works, but what I want to achieve is to do it dynamically (based on the checkbox's state).
Please advice, and I appreciate if you put a sample code.
Thank you so much Odoo Community.
Pertanyaan ini telah diberikan tanda
1
Balas
4517
Tampilan
Hi,
Try with attrs,
attrs="{'invisible':[('boolean_field','=', False)]}"
Sample:
<field name="attachment" attrs="{'invisible':[('report_type','=', 'controller')]}"/>
Thanks
Menikmati diskusi? Jangan hanya membaca, ikuti!
Buat akun sekarang untuk menikmati fitur eksklufi dan agar terlibat dengan komunitas kami!
Daftar| Post Terkait | Replies | Tampilan | Aktivitas | |
|---|---|---|---|---|
|
|
2
Mar 23
|
11493 | ||
|
Cacher le bouton "créer" d'une liste
Diselesaikan
|
|
2
Mar 23
|
3457 | |
|
Add class to button from function
Diselesaikan
|
|
2
Mei 22
|
5722 | |
|
|
0
Mar 22
|
2356 | ||
|
|
1
Mei 21
|
5397 |