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.
To pytanie dostało ostrzeżenie
1
Odpowiedz
4686
Widoki
Hi,
Try with attrs,
attrs="{'invisible':[('boolean_field','=', False)]}"
Sample:
<field name="attachment" attrs="{'invisible':[('report_type','=', 'controller')]}"/>
Thanks
Podoba Ci się ta dyskusja? Dołącz do niej!
Stwórz konto dzisiaj, aby cieszyć się ekskluzywnymi funkcjami i wchodzić w interakcje z naszą wspaniałą społecznością!
Zarejestruj się| Powiązane posty | Odpowiedzi | Widoki | Czynność | |
|---|---|---|---|---|
|
|
2
mar 23
|
11669 | ||
|
Cacher le bouton "créer" d'une liste
Rozwiązane
|
|
2
mar 23
|
3598 | |
|
Add class to button from function
Rozwiązane
|
|
2
maj 22
|
5937 | |
|
|
0
mar 22
|
2455 | ||
|
|
1
maj 21
|
5491 |