I know odoo provide attribue "attrs" that can modify invisible, readonly, etc.
for example :
<div class="border border-budget-gap-plus rounded p-2" attrs="{'invisible':[('budget_gap','>','0')]}">
..something..
</div>
But I just found that in report or any template can use t-att-class, t-if, t-else, etc
Why form view cannot use this? I tried using it like below
<div t-att-class="'border ' + (state === 'draft' ? 'border-budget-gap-minus' : 'border-budget-gap-plus') + ' rounded p-2'">
<field name="state"/>
</div>
but the result is still using 'border-budget-gap-plus' even the state is not 'draft'. If the state is not 'state', it should be 'border-budget-gap-plus', right?
is my implementation wrong? or it's just Odoo that not allow this?