Skip to Content
Meniu
Trebuie să fiți înregistrat pentru a interacționa cu comunitatea.
Această întrebare a fost marcată
1 Răspunde
3452 Vizualizări

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. 

Imagine profil
Abandonează
Cel mai bun răspuns

Hi,

Try with attrs,

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

Sample: 

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

Thanks

Imagine profil
Abandonează
Related Posts Răspunsuri Vizualizări Activitate
2
mar. 23
9799
2
mar. 23
2255
2
mai 22
4230
0
mar. 22
1501
1
mai 21
4214