update type measuring_range
This commit is contained in:
parent
c61b422cbc
commit
2ffcca013b
@ -155,6 +155,9 @@ class Template(metaclass=PoolMeta):
|
||||
warranty = fields.Integer("Warranty")
|
||||
|
||||
#### calibration parameters
|
||||
measuring_range = fields.Selection([
|
||||
('dioptria', "Dioptria"),
|
||||
('mmhg', "mmHg")], "Rango de Medición")
|
||||
MEP = fields.Float("MEP", states={'required': Eval('calibration', False)},)
|
||||
uncertainy_pattern = fields.Float("Uncertainy Pattern", states={'required': Eval('calibration', True)},
|
||||
help="Agregar valores separados por ',' Ej:-5,+5,-10,+10")
|
||||
@ -189,6 +192,11 @@ class Template(metaclass=PoolMeta):
|
||||
'invisible': ~Eval('calibration')},)
|
||||
]
|
||||
|
||||
@classmethod
|
||||
@fields.depends('measuring_range')
|
||||
def default_measuring_range(self):
|
||||
return 'dioptria'
|
||||
|
||||
@classmethod
|
||||
@fields.depends('temperature_min')
|
||||
def default_temperature_min(self):
|
||||
|
@ -61,6 +61,9 @@ this repository contains the full copyright notices and license terms. -->
|
||||
<label name="k_pattern_list"/>
|
||||
<field name="k_pattern_list"/>
|
||||
<newline/>
|
||||
<label name="measuring_range"/>
|
||||
<field name="measuring_range"/>
|
||||
<newline/>
|
||||
<label name="MEP"/>
|
||||
<field name="MEP"/>
|
||||
<newline/>
|
||||
|
Loading…
Reference in New Issue
Block a user