Skip to Content
Menu
This question has been flagged
1 Atsakyti
3443 Rodiniai

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. 

Portretas
Atmesti
Best Answer

Hi,

Try with attrs,

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

Sample: 

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

Thanks

Portretas
Atmesti
Related Posts Replies Rodiniai Veikla
2
kov. 23
9772
2
kov. 23
2234
2
geg. 22
4200
0
kov. 22
1484
1
geg. 21
4196