diff --git a/product.py b/product.py index 658574a172..535b3a57e9 100644 --- a/product.py +++ b/product.py @@ -109,3 +109,10 @@ class Template: @staticmethod def default_weight_digits(): return 2 + + @classmethod + def view_attributes(cls): + return super(Template, cls).view_attributes() + [ + ('//page[@id="measurements"]', 'states', { + 'invisible': Eval('type').in_(NON_MEASURABLE), + })] diff --git a/view/template_form.xml b/view/template_form.xml index 3eb333f650..ce01d7c8f2 100644 --- a/view/template_form.xml +++ b/view/template_form.xml @@ -3,8 +3,7 @@ this repository contains the full copyright notices and license terms. --> - +