Is it possible to hide/invisible notebook page based on states? (Odoo 13)

436 views Asked by At

I have the notebook page and 4 states in the form view.

I want the notebook page just to show in states 1 and 2 when clicking the wizard button. But when it changes to states 3 and 4, it will be hide/invisible. So is it possible to do it?

Please help! Thank you!

1

There are 1 answers

1
Khay Leng On BEST ANSWER

Add invisible attributes for the page.

<page string="Product Details" attrs="{'invisible':[('state', 'in', [2, 4])]}">
...
</page>

If state in [2, 4] is true, then the page will be invisible.

For more details, read reference