In python, I have the following field:
'transaction_date': fields.datetime('Transaction Date')
In XML, I have the following:
<field
name="transaction_date"
readonly="True"
/>
<button
name="set_void"
string="Void"
type="object"
icon="gtk-cancel"
groups="mymodule.mygroup"
attrs="{'invisible':[('transaction_date','!=', datetime.now())]}"
/>
The attrs code above doesn't currently work but what I want to do is: be able to show the "Void" button only when the transaction_date field's date value = Today. Is that possible?