diff --git a/product.py b/product.py index 525a0ca..a6559b5 100644 --- a/product.py +++ b/product.py @@ -116,11 +116,11 @@ class Template(metaclass=PoolMeta): states={'invisible' : If(Eval('frequency') == None, True)}, depends=['frequency'] ) - wet = fields.Float("Wet") - wet_uom = fields.Many2One('product.uom', "Wet UOM", + moisture = fields.Float("Moisture") + moisture_uom = fields.Many2One('product.uom', "Moisture UOM", domain=[('category', '=', Id('optical_equipment', 'uom_cat_relative_humedity'))], - states={'invisible' : If(Eval('wet') == None, True)}, - depends=['wet'] + states={'invisible' : If(Eval('moisture') == None, True)}, + depends=['moisture'] ) voltageAC = fields.Float("Voltage AC") voltageAC_uom = fields.Many2One('product.uom', "Voltage AC UOM", @@ -155,7 +155,7 @@ class Template(metaclass=PoolMeta): return measurement @staticmethod - def default_wet_uom(): + def default_moisture_uom(): pool = Pool() Measurements = pool.get('product.uom') measurement = Measurements.search(['name', '=', 'Relative Humedity'])[0].id diff --git a/view/template_form.xml b/view/template_form.xml index 8b0de21..c9b1e7c 100644 --- a/view/template_form.xml +++ b/view/template_form.xml @@ -53,9 +53,9 @@ this repository contains the full copyright notices and license terms. --> -