El 23/04/15 a les 15:47, [email protected] ha escrit:
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
You have to convert the Eval into a boolean condition.
'invisible': Bool(Eval('invoice'))
--
Sergi Almacellas Abellana
www.koolpi.com
Twitter: @pokoli_srk