Making a button invisible depending on the state is quite easy:
'invisible': Eval('state') == 'closed'
But how can I make a button invisible depending on the value of a relation
Field? I have a Many2One field which can be null, and if it is not null I
want to hide the button.
My idea would be to use an expression like the following:
'invisible': Eval('invoice', None) != None
But this doesn't work. Is there a way to hide a button depending on a
relation Field? Or I have to create a new state and then hide the button
depending on the state?
Thanks
--
Sistemes i Xarxes Inf. Calidae, S.L.
www.calidae.com <http://www.calidae.net/>
tel +34 938654433 fax +34 938651973
C/ Font i Boet, 10
08140 - Caldes de Montbui
Aquest correu és confidencial, llegiu-ne l' advertiment legal
<http://www.calidae.net/disclaimer/>
Este correo es confidencial, lea la advertencia legal
<http://www.calidae.net/disclaimer/>
This is a confidential email, please read the legal disclaimer
<http://www.calidae.net/disclaimer/>