On 2018-07-24 03:37, Richmond Fiko wrote:
> Something like:
> 
>     @classmethod
>     def view_attributes(cls):
>         # Hide the group when is_insured is not
>         # true
>         return [('//group[@id="statement_insurance_info"]', 'states', {
>                 'invisible': Not(Bool(Eval('is_insured'))),
>                 })]

You should always call super for modularity, otherwise it seems OK.
You could simplify the PYSON expression: ~Eval('is_insured')

-- 
Cédric Krier - B2CK SPRL
Email/Jabber: cedric.kr...@b2ck.com
Tel: +32 472 54 46 59
Website: http://www.b2ck.com/

-- 
You received this message because you are subscribed to the Google Groups 
"tryton" group.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tryton/20180724112013.bmhthgse7auun4ij%40kei.

Reply via email to