Hi,
I have a view like this :
<field name="product_line_ids" nolabel="1">
<tree version="7.0">
<field name="product_id" context="{'product_name_display': 'short'}" />
<field name="name" />
<field name="price_unit" />
<field name="product_qty" />
<field name="uom_id" />
<field name="total" />
<field name="is_included" />
<field name="avg_price" />
<field name="is_bought" />
<field name="origin" />
<field name="budget_line_id" />
<field name="purchase_order_id" />
<field name="type" invisible="1" />
</tree>
<form version="7.0">
<group col="4">
...
</group>
</form>
</field>
Depending if purchase_order_id is False or not, I would like to enable / disable the delete button on my view.
How can I achieve this ?
Thank you very much
Thank you Bole, This is an acceptable workaround, indeed. Too bad it's not possible to have this behaviour because with your solution, an error will appear on screen. I prefer to restrict user's actions instead of having error messages. Do you know if it's possible to create some function in javascript or jquery to realize client-side validation?