Skip to Content
Menú
This question has been flagged
1 Respondre
3388 Vistes

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. 

Avatar
Descartar
Best Answer

Hi,

Try with attrs,

attrs="{'invisible':[('boolean_field','=', False)]}"

Sample: 

<field name="attachment" attrs="{'invisible':[('report_type','=', 'controller')]}"/>

Thanks

Avatar
Descartar
Related Posts Respostes Vistes Activitat
2
de març 23
9697
2
de març 23
2140
2
de maig 22
4120
0
de març 22
1417
1
de maig 21
4102