From 944dd05bc77e3de08ba930c39712158a11ca5766 Mon Sep 17 00:00:00 2001 From: sinergia Date: Wed, 29 Nov 2023 07:34:42 -0500 Subject: [PATCH] =?UTF-8?q?feat:=20Se=20a=C3=B1ade=20firma=20a=20hoja=20de?= =?UTF-8?q?=20vida=20de=20Equipos?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- equipment.py | 7 + report/CV_Equipment.fodt | 489 +++++++++++++++++++++++---------------- 2 files changed, 294 insertions(+), 202 deletions(-) diff --git a/equipment.py b/equipment.py index bd84d95..61a81fa 100644 --- a/equipment.py +++ b/equipment.py @@ -265,6 +265,13 @@ class OpticalEquipment(DeactivableMixin, Workflow, ModelSQL, ModelView): return maintenances + def get_technician_signature(self): + pool = Pool() + ConfigurationEquipment = pool.get('optical_equipment.configuration') + config = ConfigurationEquipment(1) + if config.technician_signature: + return config.technician_signature + @ classmethod def default_state(cls): return 'draft' diff --git a/report/CV_Equipment.fodt b/report/CV_Equipment.fodt index 99f76dc..952d240 100644 --- a/report/CV_Equipment.fodt +++ b/report/CV_Equipment.fodt @@ -1,24 +1,24 @@ - 2022-10-25T06:02:43.8293012812023-09-24T21:46:15.542111557PT6H6M29S73LibreOffice/7.5.6.2$Linux_X86_64 LibreOffice_project/50$Build-2 + 2022-10-25T06:02:43.8293012812023-11-29T07:33:59.868040329PT6H35M2S82LibreOffice/7.5.8.2$Linux_X86_64 LibreOffice_project/50$Build-2 - 68790 + 69400 0 35003 - 16425 + 15688 true false view2 - 8948 - 78482 + 11691 + 79042 0 - 68790 + 69400 35001 - 85213 + 85086 0 1 false @@ -73,7 +73,7 @@ true true false - 2788432 + 2792312 true false false @@ -161,7 +161,7 @@ - + @@ -262,10 +262,10 @@ - + - + @@ -449,6 +449,15 @@ + + + + + + + + + @@ -535,203 +544,257 @@ - + - + - - - + + + - + - + + + + + - + - + - + - - - - - + + - + + + + - + - + - - - - - + + - + + + + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + + + + + - + - + - + - + - + - + - - - - - - - - - + - - + + - - - + + + - + - + + + + + + + + - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -890,7 +953,12 @@ - + + + + + + @@ -1477,254 +1545,271 @@ <for each="equipment in records"> - HOJA DE VIDA DISPOSITIVOS BIOMEDICOS + HOJA DE VIDA DISPOSITIVOS BIOMEDICOS - Fecha de generación: <format_datetime(datetime.datetime.now(),user.language, '%b/%d/%Y', equipment.company.timezone)> + Fecha de generación: <format_datetime(datetime.datetime.now(),user.language, '%b/%d/%Y', equipment.company.timezone)> - Código Equipo: <equipment.code> + Código Equipo: <equipment.code> - - INFORMACIÓN DEL PROPIETARIO + + INFORMACIÓN DEL PROPIETARIO - Nombre / Razón Social: <equipment.propietary.name> - Ciudad: <equipment.propietary_address.subdivision_municipality.name> - Teléfono: <equipment.propietary.phone> - Movil: <equipment.propietary.mobile> + Nombre / Razón Social: <equipment.propietary.name> + Ciudad: <equipment.propietary_address.subdivision_municipality.name> + Teléfono: <equipment.propietary.phone> + Movil: <equipment.propietary.mobile> - Tipo Documento: <"NIT" if equipment.propietary.tax_identifier.type=="31" else "CC"> - Documento: <equipment.propietary.tax_identifier.code> - Dirección: <equipment.propietary_address.street> + Tipo Documento: <"NIT" if equipment.propietary.tax_identifier.type=="31" else "CC"> + Documento: <equipment.propietary.tax_identifier.code> + Dirección: <equipment.propietary_address.street> - - INFORMACIÓN DEL DISPOSITIVO + + INFORMACIÓN DEL DISPOSITIVO - Nombre del Dispositivo: <equipment.product.name> - Restaurado: <"SI" if equipment.refurbish else "NO"> - Marca: <equipment.mark_category.name> - Modelo: <equipment.model_category.name> - Referencia: <equipment.reference_category.name> - País de Origen: <equipment.origin_country.name> - Registro Invima: <equipment.health_register> - Software Versión: <equipment.software_version if equipment.software_version != "" else "No Aplica"> + Nombre del Dispositivo: <equipment.product.name> + Restaurado: <"SI" if equipment.refurbish else "NO"> + Marca: <equipment.mark_category.name> + Modelo: <equipment.model_category.name> + Referencia: <equipment.reference_category.name> + País de Origen: <equipment.origin_country.name> + Registro Invima: <equipment.health_register> + Software Versión: <equipment.software_version if equipment.software_version != "" else "No Aplica"> - Serial: <equipment.serial> - <choose test=""> - <when test="equipment.product.risk == 'uno'"> - Clase de Riesgo: I - </when> - <when test="equipment.product.risk == 'dosA'"> - Clase de Riesgo: IIA - </when> - <when test="equipment.product.risk == 'dosB'"> - Clase de Riesgo: IIB - </when> - <otherwise test=""> - Clase de Riesgo: No Aplíca - </otherwise> - </choose> - <choose test=""> - <when test="equipment.use == 'medico'"> - Uso: Médico - </when> - <when test="equipment.use == 'basico'"> - Uso: Básico - </when> - <when test="equipment.use == 'apoyo'"> - Uso: Apoyo - </when> - <otherwise test=""> - Uso: n/a - </otherwise> - </choose> - Clase Biomédica: <equipment.biomedical_class> - <choose test=""> - <when test="equipment.equipment_type == 'mobiliario_optico'"> - Tipo: Mobiliario óptico - </when> - <when test="equipment.equipment_type == 'refraccion'"> - Tipo: Refracción - </when> - <when test="equipment.equipment_type == 'medicion'"> - Tipo: Medición - </when> - <when test="equipment.equipment_type == 'accesorios'"> - Tipo: Accesorios - </when> - <otherwise test=""> - Tipo: n/a - </otherwise> - </choose> - <choose test=""> - <when test="equipment.use == 'medico'"> - Uso: Médico - </when> - <when test="equipment.use == 'basico'"> - Uso: Básico - </when> - <when test="equipment.use == 'apoyo'"> - Uso: Apoyo - </when> - <otherwise test=""> - Uso: n/a - </otherwise> - </choose> - Garantía: <equipment.warranty>Meses - Vida Útil: <equipment.useful_life>Meses + Serial: <equipment.serial> + <choose test=""> + <when test="equipment.product.risk == 'uno'"> + Clase de Riesgo: I + </when> + <when test="equipment.product.risk == 'dosA'"> + Clase de Riesgo: IIA + </when> + <when test="equipment.product.risk == 'dosB'"> + Clase de Riesgo: IIB + </when> + <otherwise test=""> + Clase de Riesgo: No Aplíca + </otherwise> + </choose> + <choose test=""> + <when test="equipment.use == 'medico'"> + Uso: Médico + </when> + <when test="equipment.use == 'basico'"> + Uso: Básico + </when> + <when test="equipment.use == 'apoyo'"> + Uso: Apoyo + </when> + <otherwise test=""> + Uso: n/a + </otherwise> + </choose> + Clase Biomédica: <equipment.biomedical_class> + <choose test=""> + <when test="equipment.equipment_type == 'mobiliario_optico'"> + Tipo: Mobiliario óptico + </when> + <when test="equipment.equipment_type == 'refraccion'"> + Tipo: Refracción + </when> + <when test="equipment.equipment_type == 'medicion'"> + Tipo: Medición + </when> + <when test="equipment.equipment_type == 'accesorios'"> + Tipo: Accesorios + </when> + <otherwise test=""> + Tipo: n/a + </otherwise> + </choose> + <choose test=""> + <when test="equipment.use == 'medico'"> + Uso: Médico + </when> + <when test="equipment.use == 'basico'"> + Uso: Básico + </when> + <when test="equipment.use == 'apoyo'"> + Uso: Apoyo + </when> + <otherwise test=""> + Uso: n/a + </otherwise> + </choose> + Garantía: <equipment.warranty>Meses + Vida Útil: <equipment.useful_life>Meses - + - CARACTERÍSTICAS TÉCNICAS + CARACTERÍSTICAS TÉCNICAS - Características Físicas + Características Físicas - Peso + Peso - <str(equipment.product.weight) + " "+ equipment.product.weight_uom.symbol if equipment.product.weight else ""> + <str(equipment.product.weight) + " "+ equipment.product.weight_uom.symbol if equipment.product.weight else ""> - Medidas + Medidas - <"Longitud:" +str(equipment.product.length) + " "+ equipment.product.length_uom.symbol+" Altura: "+str(equipment.product.height) + " "+ equipment.product.height_uom.symbol + " Ancho: "+str(equipment.product.width) + " "+ equipment.product.width_uom.symbol if equipment.product.width else ""> + <"Longitud:" +str(equipment.product.length) + " "+ equipment.product.length_uom.symbol+" Altura: "+str(equipment.product.height) + " "+ equipment.product.height_uom.symbol + " Ancho: "+str(equipment.product.width) + " "+ equipment.product.width_uom.symbol if equipment.product.width else ""> - Características Eléctricas + Características Eléctricas - Voltaje (VAC) + Voltaje (VAC) - <str(equipment.product.voltageAC) + " "+ equipment.product.voltageAC_uom.symbol if equipment.product.voltageAC else "No Aplica"> + <str(equipment.product.voltageAC) + " "+ equipment.product.voltageAC_uom.symbol if equipment.product.voltageAC else "No Aplica"> - Voltaje (VDC) + Voltaje (VDC) - <str(equipment.product.voltageDC) + " "+ equipment.product.voltageDC_uom.symbol if equipment.product.voltageDC else "No Aplica"> + <str(equipment.product.voltageDC) + " "+ equipment.product.voltageDC_uom.symbol if equipment.product.voltageDC else "No Aplica"> - Condiciones Ambientales + Condiciones Ambientales - Tem Min Uso + Tem Min Uso - <str(equipment.product.temperature_min) + " "+ equipment.product.temperature_uom.symbol if equipment.product.temperature_min else ""> + <str(equipment.product.temperature_min) + " "+ equipment.product.temperature_uom.symbol if equipment.product.temperature_min else ""> - Tem Max Uso + Tem Max Uso - <str(equipment.product.temperature_max) + " "+ equipment.product.temperature_uom.symbol if equipment.product.temperature_max else ""> + <str(equipment.product.temperature_max) + " "+ equipment.product.temperature_uom.symbol if equipment.product.temperature_max else ""> - Hum Min Uso + Hum Min Uso - <str(equipment.product.moisture_min) + " "+ equipment.product.moisture_uom.symbol if equipment.product.moisture_min else ""> + <str(equipment.product.moisture_min) + " "+ equipment.product.moisture_uom.symbol if equipment.product.moisture_min else ""> - Hum Max Uso + Hum Max Uso - <str(equipment.product.moisture_max) + " "+ equipment.product.moisture_uom.symbol if equipment.product.moisture_max else ""> + <str(equipment.product.moisture_max) + " "+ equipment.product.moisture_uom.symbol if equipment.product.moisture_max else ""> - Requiere Calibración + Requiere Calibración - <"SI" if equipment.calibration else "NO"> + <"SI" if equipment.calibration else "NO"> - Frecuencia de Mantenimiento Preventivo y calibración (Sí aplíca) + Frecuencia de Mantenimiento Preventivo y calibración (Sí aplíca) - <equipment.maintenance_frequency>Meses + <equipment.maintenance_frequency>Meses - + - + Texto 1: - - - - - - - - - El equipo funciona cumpliendo los parámetros establecidos por el fabricante + + + + + + + + + El equipo funciona cumpliendo los parámetros establecidos por el fabricante - <equipment.technician_responsible> - INVIMA : <equipment.invima> - </for> + + + + + + <if test="equipment.get_technician_signature()"> + + + + Texto 2: + + + </if> + <equipment.technician_responsible> + INVIMA : <equipment.invima> + + + + + </for> \ No newline at end of file