From f1ab596006f1a9801ead57118745842473640593 Mon Sep 17 00:00:00 2001 From: raskolnikov Date: Sun, 20 Nov 2022 21:27:33 -0500 Subject: [PATCH] Update report cv_equipment --- equipment.py | 1 + product.py | 2 +- report/CV_Equipment.fodt | 708 ++++++++++++++++++--------------------- 3 files changed, 327 insertions(+), 384 deletions(-) diff --git a/equipment.py b/equipment.py index 80c90c5..9c488fa 100644 --- a/equipment.py +++ b/equipment.py @@ -293,6 +293,7 @@ class OpticalEquipment(DeactivableMixin, Workflow, ModelSQL, ModelView): @Workflow.transition('registred') def registred(cls, equipments): for i in equipments: + raise UserError(str(dir(i.use))) if i.serial == None: raise UserError(str("El Equipo no cuenta con un Serial")) else: diff --git a/product.py b/product.py index 0ae893f..33fe23b 100644 --- a/product.py +++ b/product.py @@ -34,7 +34,7 @@ _EQUIPMENT_TYPE = [ ('', ""), ('mobiliario_optico', 'Mobiliario óptico'), ('refraccion', 'Refracción'), - ('medico', 'Medicion'), + ('medicion', 'Medicion'), ('accesorios', 'Accesorios')] NON_MEASURABLE = ['service'] diff --git a/report/CV_Equipment.fodt b/report/CV_Equipment.fodt index dc9ae51..f878c9a 100644 --- a/report/CV_Equipment.fodt +++ b/report/CV_Equipment.fodt @@ -1,24 +1,24 @@ - 2022-10-25T06:02:43.8293012812022-11-18T15:21:18.846383897PT5H7M30S38LibreOffice/7.3.7.2$Linux_X86_64 LibreOffice_project/30$Build-2 + 2022-10-25T06:02:43.8293012812022-11-20T21:24:45.012559742PT5H31M8S47LibreOffice/7.3.7.2$Linux_X86_64 LibreOffice_project/30$Build-2 - 22490 + 9657 0 - 30462 - 14025 + 30478 + 14058 true false view2 - 22737 - 20876 + 15333 + 15312 0 - 22490 - 30461 - 36513 + 9657 + 30476 + 23714 0 1 false @@ -88,7 +88,7 @@ true true - 1565224 + 1995968 true false @@ -155,14 +155,14 @@ - + - + @@ -173,17 +173,17 @@ - + - + - + @@ -193,16 +193,16 @@ - - + + - - + + @@ -211,14 +211,17 @@ + + + - + - + @@ -274,17 +277,17 @@ - - + + $ - + - $ - + @@ -292,99 +295,99 @@ - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + @@ -392,12 +395,12 @@ - + - + @@ -429,198 +432,133 @@ - + - - - - - - - - - + - + - + - - - - - - - - - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + - + - + - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -628,118 +566,94 @@ - - - - - - - - - - - - - - - - - - - - - - - - - + - + - + - + - + + + + + + + + + + + + + + + + + + + + + + + + + - + - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + - + + + + + + + + + + + + + + + + + + + - + - - + + - - + + - + @@ -755,7 +669,7 @@ - + /9j/4AAQSkZJRgABAQEAYABgAAD/2wBDAAMCAgMCAgMDAwMEAwMEBQgFBQQEBQoHBwYIDAoM DAsKCwsNDhIQDQ4RDgsLEBYQERMUFRUVDA8XGBYUGBIUFRT/2wBDAQMEBAUEBQkFBQkUDQsN FBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBT/wAAR @@ -1307,200 +1221,228 @@ - <for each="equipment in records"> - HOJA DE VIDA DISPOSITIVOS BIOMEDICOS + <for each="equipment in records"> + 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> - Clase de Riesgo: <equipment.product.risk> - Clase Biomédica: <equipment.biomedical_class> - Tipo: <equipment.equipment_type> - Uso: <equipment.use> - Garantía: <equipment.warranty> - Vida Útil: <equipment.useful_life> + Serial: <equipment.serial> + Clase de Riesgo: <equipment.product.risk> + 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> + Vida Útil: <equipment.useful_life> - + - 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 - - - ANTHONY STIVEN RODRIGUEZ FONSECA - INVIMA : RH-202208-01301 - </for> + + + + + + + + + + + + + El equipo funciona cumpliendo los parámetros establecidos por el fabricante + + + ANTHONY STIVEN RODRIGUEZ FONSECA + INVIMA : RH-202208-01301 + </for> \ No newline at end of file