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.
Odoo is the world's easiest all-in-one management software.
It includes hundreds of business apps:
- CRM
- e-Commerce
- Účetnictví
- Sklad
- PoS
- Project
- MRP
This question has been flagged
1
Odpovědět
3222
Zobrazení
Hi,
Try with attrs,
attrs="{'invisible':[('boolean_field','=', False)]}"
Sample:
<field name="attachment" attrs="{'invisible':[('report_type','=', 'controller')]}"/>
Thanks
Enjoying the discussion? Don't just read, join in!
Create an account today to enjoy exclusive features and engage with our awesome community!
Přihlásit seRelated Posts | Odpovědi | Zobrazení | Aktivita | |
---|---|---|---|---|
|
2
bře 23
|
9267 | ||
Cacher le bouton "créer" d'une liste
Vyřešeno
|
|
2
bře 23
|
1941 | |
Add class to button from function
Vyřešeno
|
|
2
kvě 22
|
3884 | |
|
0
bře 22
|
1288 | ||
|
1
kvě 21
|
3903 |