From ebf2dd372ec10726f4a3e4b6d8969e73d73b7d0f Mon Sep 17 00:00:00 2001 From: sinergia Date: Fri, 22 Jul 2022 16:13:54 -0500 Subject: [PATCH] view asigned serials --- equipment.py | 12 ++++++------ equipment.xml | 37 +++++++++++++++++++++++++++++++++++++ locale/es.po | 20 ++++++++++++++++++++ product.py | 10 ++++++++++ view/template_form.xml | 15 +++++++++++++++ 5 files changed, 88 insertions(+), 6 deletions(-) diff --git a/equipment.py b/equipment.py index 52a613f..ea79838 100644 --- a/equipment.py +++ b/equipment.py @@ -39,12 +39,12 @@ class OpticalEquipment(Workflow, ModelSQL, ModelView): ) refurbish = fields.Boolean("Refurbish", states={'readonly': Eval('state') != 'draft',},) - equipment_type = fields.Char('type', readonly=True) - risk = fields.Char('Type risk',readonly=True) - use = fields.Char('Use', readonly=True) - biomedical_class = fields.Char('Biomedical Class', readonly=True) - main_tecnology = fields.Char('Main tecnology', readonly=True) - calibration = fields.Boolean("Apply calibration", readonly=True) + equipment_type = fields.Char('type', states={'readonly': If('product', True)}) + risk = fields.Char('Type risk',states={'readonly': If('product', True)}) + use = fields.Char('Use', states={'readonly': If('product', True)}) + biomedical_class = fields.Char('Biomedical Class', states={'readonly': If('product', True)}) + main_tecnology = fields.Char('Main tecnology', states={'readonly': If('product', True)}) + calibration = fields.Boolean("Apply calibration", states={'readonly': If('product', True)}) mark_category = fields.Many2One('product.category', 'Mark', required=True, domain=[('parent', '=', None), ('accounting', '=', False)], diff --git a/equipment.xml b/equipment.xml index 0e2edd7..a132cd3 100644 --- a/equipment.xml +++ b/equipment.xml @@ -87,12 +87,49 @@ action="act_optical_equipment_form" sequence="20" id="menu_optical_equipment_form"/> + + + Serials + optical_equipment.equipment + + + + optical_equipment.equipment + tree + optical_equipment_serial_tree + + + + + + + + Draft + + + + + + + + + + Equipment diff --git a/locale/es.po b/locale/es.po index 43e5331..c73efb0 100644 --- a/locale/es.po +++ b/locale/es.po @@ -6,6 +6,10 @@ msgctxt "view:product.template:" msgid "Features" msgstr "Características" +msgctxt "view:product.template:" +msgid "Calibration" +msgstr "Calibración" + msgctxt "view:product.template:" msgid "Measurements of Equipment" msgstr "Medidas del Equipo" @@ -105,3 +109,19 @@ msgstr "Vida útil" msgctxt "field:product.template,warranty:" msgid "Warranty" msgstr "Garantía" + +msgctxt "field:product.template,uncertainy_pattern:" +msgid "Uncertainy Pattern" +msgstr "Patrón de Incertidumbre" + +msgctxt "field:product.template,k_pattern:" +msgid "K Pattern" +msgstr "Patrón K" + +msgctxt "field:product.template,d_resolution:" +msgid "Resolution d" +msgstr "Resolución (d)" + +msgctxt "field:product.template,analog_resolution:" +msgid "Analog resolution" +msgstr "Resolución Analoga" diff --git a/product.py b/product.py index 53d9021..3fd04f5 100644 --- a/product.py +++ b/product.py @@ -146,6 +146,16 @@ class Template(metaclass=PoolMeta): useful_life = fields.Integer("Useful life") warranty = fields.Integer("Warranty") + #### calibration parameters + + uncertainy_pattern = fields.Char("Uncertainy Pattern", + help="Agregar valores separados por ',' Ej:-5,+5,-10,+10") + k_pattern = fields.Char("K Pattern", + help="Agregar valores separados por ',' Ej:-5,+5,-10,+10") + d_resolution = fields.Integer("Resolution d") + analog_resolution = fields.Integer("Analog resolution") + Usubi = fields.Integer("Usub i") + @classmethod @fields.depends('temperature') def default_temperature_uom(self): diff --git a/view/template_form.xml b/view/template_form.xml index 490af71..8b8294c 100644 --- a/view/template_form.xml +++ b/view/template_form.xml @@ -47,6 +47,21 @@ this repository contains the full copyright notices and license terms. -->