I've set my order_line to be editable and want to remove the delete button if it's not in draft mode. I attempted the following but the delet button remains:
<xpath expr="//field[@name='order_line']//tree" position="attributes">
<attribute name="delete" domain="[(parent.state,'!=','draft')]"/>
</xpath>
Is it possible to dynamically set delete=false based on the draft state of the parent?