Zum Inhalt springen
Menü
Sie müssen registriert sein, um mit der Community zu interagieren.
Diese Frage wurde gekennzeichnet
1 Antworten
3554 Ansichten

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
Verwerfen
Beste Antwort

Hi,

Try with attrs,

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

Sample: 

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

Thanks

Avatar
Verwerfen
Verknüpfte Beiträge Antworten Ansichten Aktivität
2
März 23
10039
2
März 23
2448
2
Mai 22
4410
0
März 22
1591
1
Mai 21
4381