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.
Dette spørgsmål er blevet anmeldt
1
Svar
4805
Visninger
Hi,
Try with attrs,
attrs="{'invisible':[('boolean_field','=', False)]}"
Sample:
<field name="attachment" attrs="{'invisible':[('report_type','=', 'controller')]}"/>
Thanks
Kan du lide at diskutere? Læs ikke bare med, deltag aktivt i debatten!
Opret en konto i dag for at få glæde af eksklusive funktioner, og bliv en del af vores skønne fællesskab!
Tilmeld dig| Relaterede indlæg | Besvarelser | Visninger | Aktivitet | |
|---|---|---|---|---|
|
|
2
mar. 23
|
11815 | ||
|
|
2
mar. 23
|
3735 | ||
|
|
2
maj 22
|
6128 | ||
|
|
0
mar. 22
|
2598 | ||
|
|
1
maj 21
|
5559 |