Hi, how can I hide hide a button which is found in header, using condition e.g when total sum is 0 then the button should disappear(hide).
Odoo is the world's easiest all-in-one management software.
It includes hundreds of business apps:
- CRM
- e-Commerce
- Kế toán
- Tồn kho
- PoS
- Project
- MRP
Câu hỏi này đã bị gắn cờ
Hello Loomoni,
You can add the attrs attribute to the button in the XML to achieve this.
Your button would look something like this:
<button name="x" type="y" string="z" attrs="{'invisible': [('summation', '=', 0)]}"/>
This code assumes that your summation field is an integer field and that the summation field already exists on the form view of the XML.
I hope this helps,
Thanks,
Bạn có hứng thú với cuộc thảo luận không? Đừng chỉ đọc, hãy tham gia nhé!
Tạo tài khoản ngay hôm nay để tận hưởng các tính năng độc đáo và tham gia cộng đồng tuyệt vời của chúng tôi!
Đăng ký
Hello,
Is this a button which already exists on a form or is this one you are adding?
Thanks,
Can you please add more details of your question ?
I added the button, and it should disappear after summation is 0