diff --git a/asset.py b/asset.py index e4389fd..13f269a 100644 --- a/asset.py +++ b/asset.py @@ -340,3 +340,16 @@ class Asset: @staticmethod def default_conductors_connection(): return '' + + @classmethod + def view_attributes(cls): + res = super(Asset, cls).view_attributes() + res += [ + ('/form/separator[@id="elevator"]', 'states', { + 'invisible': Eval('type') != 'elevator', + }), + ('/form/notebook/page[@id="components"]', 'states', { + 'invisible': Eval('type') != 'elevator', + }), + ] + return res diff --git a/view/asset_form.xml b/view/asset_form.xml index ba6883d..62cad00 100644 --- a/view/asset_form.xml +++ b/view/asset_form.xml @@ -3,7 +3,7 @@ copyright notices and license terms. --> - + - +