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:
- 客戶關係
- e-Commerce
- 會計
- 庫存
- PoS
- Project
- MRP
此問題已被標幟
1
回覆
3438
瀏覽次數
Hi,
Try with attrs,
attrs="{'invisible':[('boolean_field','=', False)]}"
Sample:
<field name="attachment" attrs="{'invisible':[('report_type','=', 'controller')]}"/>
Thanks
相關帖文 | 回覆 | 瀏覽次數 | 活動 | |
---|---|---|---|---|
|
2
3月 23
|
9765 | ||
|
2
3月 23
|
2225 | ||
|
2
5月 22
|
4188 | ||
|
0
3月 22
|
1481 | ||
|
1
5月 21
|
4193 |