Se rendre au contenu
Menu
Cette question a été signalée
1 Répondre
3582 Vues

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
Ignorer
Meilleure réponse

Hi,

Try with attrs,

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

Sample: 

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

Thanks

Avatar
Ignorer
Publications associées Réponses Vues Activité
2
mars 23
10079
2
mars 23
2471
2
mai 22
4458
0
mars 22
1614
1
mai 21
4408