diff --git a/locale/es.po b/locale/es.po
index 5773843..30ef2a7 100644
--- a/locale/es.po
+++ b/locale/es.po
@@ -166,6 +166,10 @@ msgctxt "field:product.template,k_pattern_list:"
msgid "List of patterns K"
msgstr "Lista de patrones K"
+msgctxt "field:product.template,preventive_activities:"
+msgid "Preventive Activities"
+msgstr "Actividades Preventivas"
+
msgctxt "field:optical_equipment.configuration,equipment_sequence:"
msgid "Equipment Sequence"
msgstr "Secuencia de Equipos"
diff --git a/product.py b/product.py
index 1dd4945..242b908 100644
--- a/product.py
+++ b/product.py
@@ -184,6 +184,9 @@ class Template(metaclass=PoolMeta):
optical = fields.Boolean("Optical")
check_calibration = fields.Boolean("Verificar Calibración")
+ # Maintenance activites Preventives
+ preventive_activities = fields.Text("Preventive Activities")
+
@classmethod
def view_attributes(cls):
return super(Template, cls).view_attributes() + [
diff --git a/report/Maintenance_Service.fodt b/report/Maintenance_Service.fodt
index d1c1517..75900a6 100644
--- a/report/Maintenance_Service.fodt
+++ b/report/Maintenance_Service.fodt
@@ -1,24 +1,24 @@
- 2022-11-03T17:09:30.5000787642023-09-24T21:19:00.980634559PT1H39M48S34LibreOffice/7.5.6.2$Linux_X86_64 LibreOffice_project/50$Build-2
+ 2022-11-03T17:09:30.5000787642023-11-27T17:31:57.204796437PT2H35S39LibreOffice/7.5.8.2$Linux_X86_64 LibreOffice_project/50$Build-2
- 55326
+ 31877
0
35003
- 15688
+ 16425
true
false
view2
- 8804
- 67389
+ 20874
+ 11042
0
- 55326
+ 31877
35001
- 71012
+ 48301
0
1
false
@@ -73,7 +73,7 @@
true
true
false
- 2272625
+ 2364367
true
false
false
@@ -160,7 +160,7 @@
-
+
@@ -261,10 +261,10 @@
-
+
-
+
@@ -571,97 +571,121 @@
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
+
+
+
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
@@ -745,50 +769,62 @@
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
+
+
+
+
+
+
+
+
+
+
+
+
@@ -1375,35 +1411,35 @@
<for each="maintenance in records">
- <choose test="">
- <when test="maintenance.maintenance_type == 'initial'">
+ <choose test="">
+ <when test="maintenance.maintenance_type == 'initial'">
+ REGISTRO DE MANTENIMIENTO INICIAL
+ </when>
+ <when test="maintenance.maintenance_type == 'preventive'">
REGISTRO DE MANTENIMIENTO PREVENTIVO
- </when>
- <when test="maintenance.maintenance_type == 'preventive'">
- REGISTRO DE MANTENIMIENTO PREVENTIVO
- </when>
- <when test="maintenance.maintenance_type == 'corrective'">
- REGISTRO DE MANTENIMIENTO CORRECTIVO
- </when>
- </choose>
- Fecha <format_datetime(datetime.datetime.now(),user.language, '%b/%d/%Y', maintenance.company.timezone)>
- Consecutivo <maintenance.code>
-
- INFORMACIÓN DEL PROPIETARIO
+ </when>
+ <when test="maintenance.maintenance_type == 'corrective'">
+ REGISTRO DE MANTENIMIENTO CORRECTIVO
+ </when>
+ </choose>
+ Fecha <format_datetime(datetime.datetime.now(),user.language, '%b/%d/%Y', maintenance.company.timezone)>
+ Consecutivo <maintenance.code>
+
+ INFORMACIÓN DEL PROPIETARIO
- Nombre / Razón Social: <maintenance.propietary.name>
- Ciudad: <maintenance.propietary_address.subdivision_municipality.name>
- Teléfono: <maintenance.propietary.phone>
- Movil: <maintenance.propietary.mobile>
+ Nombre / Razón Social: <maintenance.propietary.name>
+ Ciudad: <maintenance.propietary_address.subdivision_municipality.name>
+ Teléfono: <maintenance.propietary.phone>
+ Movil: <maintenance.propietary.mobile>
- Tipo Documento: <"NIT" if maintenance.propietary.tax_identifier.type=="31" else "CC">
- Documento: <maintenance.propietary.tax_identifier.code>
- Dirección: <maintenance.propietary_address.street>
+ Tipo Documento: <"NIT" if maintenance.propietary.tax_identifier.type=="31" else "CC">
+ Documento: <maintenance.propietary.tax_identifier.code>
+ Dirección: <maintenance.propietary_address.street>
@@ -1414,144 +1450,143 @@
- Nombre del Dispositivo: <maintenance.equipment.product.name>
- Marca: <maintenance.equipment.mark_category.name>
- Serial: <maintenance.equipment.serial>
+ Nombre del Dispositivo: <maintenance.equipment.product.name>
+ Marca: <maintenance.equipment.mark_category.name>
+ Serial: <maintenance.equipment.serial>
- Modelo: <maintenance.equipment.model_category.name>
- Referencia: <maintenance.equipment.reference_category.name>
- Registro Invima: <maintenance.equipment.health_register>
+ Modelo: <maintenance.equipment.model_category.name>
+ Referencia: <maintenance.equipment.reference_category.name>
+ Registro Invima: <maintenance.equipment.health_register>
- <choose test="">
- <when test="maintenance.maintenance_type == 'preventive'">
+ <choose test="">
+ <when test="maintenance.maintenance_type == 'preventive'">
Trabajo Realizado
-
- 1. Verificación inicial de funcionamiento:
+ 1. Verificación inicial de funcionamiento:
- <"SI" if maintenance.initial_operation else "NO">
+ <"X" if maintenance.initial_operation else "">
- 2. Revisión del Equipo:
+ 2. Revisión del Equipo:
- <"SI" if maintenance.check_equipment else "NO">
+ <"X" if maintenance.check_equipment else "">
- 3. Revisión del sistema eléctrico:
+ 3. Revisión del sistema eléctrico:
- <"SI" if maintenance.check_electric_system else "NO">
+ <"X" if maintenance.check_electric_system else "">
- 4. Limpieza interior y exterior:
+ 4. Limpieza interior y exterior:
- <"SI" if maintenance.clean_int_ext else "NO">
+ <"X" if maintenance.clean_int_ext else "">
- 5. Limpieza de lentes y espejos:
+ 5. Limpieza de lentes y espejos:
- <"SI" if maintenance.clean_eyes else "NO">
+ <"X" if maintenance.clean_eyes else "">
- 6. Verificar Calibración:
+ 6. Verificar Calibración:
- <"SI" if maintenance.check_calibration else "NO">
+ <"X" if maintenance.check_calibration else "">
- </when>
- <when test="maintenance.maintenance_type == 'corrective'">
- Trabajo Realizado
+ </when>
+ <when test="maintenance.maintenance_type == 'corrective'">
+ Trabajo Realizado
- Repuesto
+ Repuesto
- Actividad de Mantenimiento
+ Actividad de Mantenimiento
- Descripción
+ Descripción
- <for each="line in maintenance.maintenance_lines">
+ <for each="line in maintenance.maintenance_lines">
- <"X" if line.line_replace else "">
+ <"X" if line.line_replace else "">
- <"X" if line.line_maintenance_activity else "">
+ <"X" if line.line_maintenance_activity else "">
- <line.maintenance_activity.name if line.line_maintenance_activity else line.replacement.name>
+ <line.maintenance_activity.name if line.line_maintenance_activity else line.replacement.name>
<if test="line.description">
<for each="description in line.description.split('\n')">
<description>
</for>
</if>
-
+
- </for>
+ </for>
- </when>
- </choose>
+ </when>
+ </choose>
Observaciones
- <maintenance.description_activity>
-
-
- Fecha del próximo mantenimiento <str(maintenance.next_maintenance)[0:11]>
+ <maintenance.description_activity>
+
+
+ Fecha del próximo mantenimiento <str(maintenance.next_maintenance)[0:11]>
- <maintenance.technician_responsible>
- INVIMA :<maintenance.invima>
+ <maintenance.technician_responsible>
+ INVIMA :<maintenance.invima>
</for>
-
+
diff --git a/report/Service.fodt b/report/Service.fodt
index dfa3bf9..56ffabe 100644
--- a/report/Service.fodt
+++ b/report/Service.fodt
@@ -1,28 +1,28 @@
- 2022-11-03T17:09:30.5000787642023-09-24T21:18:26.372528115PT3H47M15S52LibreOffice/7.5.6.2$Linux_X86_64 LibreOffice_project/50$Build-2
+ 2022-11-03T17:09:30.5000787642023-11-28T07:41:00.422955630PT4H16M40S70LibreOffice/7.5.8.2$Linux_X86_64 LibreOffice_project/50$Build-2
- 47837
+ 43954
0
- 24502
- 11499
+ 35003
+ 16425
true
false
view2
- 3455
- 51410
+ 8707
+ 66784
0
- 47837
- 24500
- 59334
+ 43954
+ 35001
+ 60378
0
1
false
- 200
+ 140
false
false
false
@@ -73,7 +73,7 @@
true
true
false
- 2591873
+ 2756670
true
false
false
@@ -160,7 +160,7 @@
-
+
@@ -261,10 +261,10 @@
-
+
-
+
@@ -321,16 +321,16 @@
-
+
$
-
+
-
$
-
+
@@ -392,25 +392,25 @@
-
+
-
-
+
+
-
-
+
+
-
+
-
+
-
+
-
+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
+
-
+
-
+
-
-
+
+
-
+
-
-
-
-
-
-
-
+
-
+
-
+
-
+
-
+
-
+
-
-
-
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
-
+
+
+
+
+
+
+
+
+
+
+
@@ -1002,7 +853,7 @@
-
+
/9j/4AAQSkZJRgABAQEAYABgAAD/2wBDAAMCAgMCAgMDAwMEAwMEBQgFBQQEBQoHBwYIDAoM
DAsKCwsNDhIQDQ4RDgsLEBYQERMUFRUVDA8XGBYUGBIUFRT/2wBDAQMEBAUEBQkFBQkUDQsN
FBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBT/wAAR
@@ -1563,173 +1414,182 @@
- <for each="maintenance in records">
- <for each="line in maintenance.lines">
- <choose test="">
- <when test="line.maintenance_type == 'initial'">
- REGISTRO DE MANTENIMIENTO PREVENTIVO
- </when>
- <when test="line.maintenance_type == 'preventive'">
- REGISTRO DE MANTENIMIENTO PREVENTIVO
- </when>
- <when test="line.maintenance_type == 'corrective'">
- REGISTRO DE MANTENIMIENTO CORRECTIVO
- </when>
- </choose>
- Fecha <maintenance.estimated_agended.date()>
- Consecutivo <line.code>
-
- INFORMACIÓN DEL PROPIETARIO
+ <for each="maintenance in records">
+ <for each="line in maintenance.lines">
+ <choose test="">
+ <when test="line.maintenance_type == 'initial'">
+ REGISTRO DE MANTENIMIENTO INICIAL
+ </when>
+ <when test="line.maintenance_type == 'preventive'">
+ REGISTRO DE MANTENIMIENTO PREVENTIVO
+ </when>
+ <when test="line.maintenance_type == 'corrective'">
+ REGISTRO DE MANTENIMIENTO CORRECTIVO
+ </when>
+ </choose>
+ Fecha <maintenance.estimated_agended.date()>
+ Consecutivo <line.code>
+
+ INFORMACIÓN DEL PROPIETARIO
- Nombre / Razón Social: <line.propietary.name>
- Ciudad: <line.propietary_address.subdivision_municipality.name>
- Teléfono: <line.propietary.phone>
- Movil: <line.propietary.mobile>
+ Nombre / Razón Social: <line.propietary.name>
+ Ciudad: <line.propietary_address.subdivision_municipality.name>
+ Teléfono: <line.propietary.phone>
+ Movil: <line.propietary.mobile>
- Tipo Documento: <"NIT" if line.propietary.tax_identifier.type=="31" else "CC">
- Documento: <line.propietary.tax_identifier.code>
- Dirección: <line.propietary_address.street>
+ Tipo Documento: <"NIT" if line.propietary.tax_identifier.type=="31" else "CC">
+ Documento: <line.propietary.tax_identifier.code>
+ Dirección: <line.propietary_address.street>
-
- INFORMACIÓN DEL DISPOSITIVO
+
+ INFORMACIÓN DEL DISPOSITIVO
- Nombre del Dispositivo: <line.equipment.product.name>
- Marca: <line.equipment.mark_category.name>
- Serial: <line.equipment.serial>
+ Nombre del Dispositivo: <line.equipment.product.name>
+ Marca: <line.equipment.mark_category.name>
+ Serial: <line.equipment.serial>
- Modelo: <line.equipment.model_category.name>
- Referencia: <line.equipment.reference_category.name>
- Registro Invima: <line.equipment.health_register>
+ Modelo: <line.equipment.model_category.name>
+ Referencia: <line.equipment.reference_category.name>
+ Registro Invima: <line.equipment.health_register>
- <choose test="">
- <when test="line.maintenance_type == 'preventive'">
- Trabajo Realizado
-
-
-
-
+ <choose test="">
+ <when test="line.maintenance_type == 'preventive' or line.maintenance_type == 'initial'">
+ Trabajo Realizado
+
+
+
+
-
- 1. Verificación inicial de funcionamiento:
+
+ 1. Verificación inicial de funcionamiento:
-
- <"SI" if line.initial_operation else "NO">
+
+ <"X" if line.initial_operation else "">
-
- 2. Revisión del Equipo:
+
+ 2. Revisión del Equipo:
-
- <"SI" if line.check_equipment else "NO">
+
+ <"X" if line.check_equipment else "">
-
- 3. Revisión del sistema eléctrico:
+
+ 3. Revisión del sistema eléctrico:
-
- <"SI" if line.check_electric_system else "NO">
+
+ <"X" if line.check_electric_system else "">
-
- 4. Limpieza interior y exterior:
+
+ 4. Limpieza interior y exterior:
-
- <"SI" if line.clean_int_ext else "NO">
+
+ <"X" if line.clean_int_ext else "">
-
- 5. Limpieza de lentes y espejos:
+
+ 5. Limpieza de lentes y espejos:
-
- <"SI" if line.clean_eyes else "NO">
+
+ <"X" if line.clean_eyes else "">
-
- 6. Verificar Calibración:
+
+ 6. Verificar Calibración:
-
- <"SI" if line.check_calibration else "NO">
+
+ <"X" if line.check_calibration else "">
- </when>
- <when test="line.maintenance_type == 'corrective'">
- Trabajo Realizado
+
+ </when>
+ <when test="line.maintenance_type == 'corrective'">
+ Trabajo Realizado
- Repuesto
+ Repuesto
- Actividad de Mantenimiento
+ Actividad de Mantenimiento
- Descripción
+ Descripción
- <for each="line_maintenance in line.maintenance_lines">
+ <for each="line_maintenance in line.maintenance_lines">
- <"X" if line_maintenance.line_replace else "">
+ <"X" if line_maintenance.line_replace else "">
- <"X" if line_maintenance.line_maintenance_activity else "">
+ <"X" if line_maintenance.line_maintenance_activity else "">
- <line_maintenance.maintenance_activity.name if line.line_maintenance_activity else line.replacement.name>
+ <line_maintenance.maintenance_activity.name if line.line_maintenance_activity else line.replacement.name>
- </for>
+ </for>
- </when>
- </choose>
- Observaciones:
- <line.description_activity>
-
-
- Fecha del próximo mantenimiento <str(line.next_maintenance)[0:11]>
-
- <line.technician_responsible>
- INVIMA : <line.invima>
-
- </for>
- </for>
-
+ </when>
+ </choose>
+ <choose test="">
+ <when test="line.equipment.product.preventive_activities">
+ Actividades Realizadas:
+ <for each="description in (line.equipment.product.preventive_activities or '').split('\n')">
+ <description>
+ </for>
+ </when>
+ </choose>
+ Observaciones:
+ <line.description_activity>
+
+
+ Fecha del próximo mantenimiento <str(line.next_maintenance)[0:11]>
+
+ <line.technician_responsible>
+ INVIMA : <line.invima>
+
+ </for>
+ </for>
+
\ No newline at end of file
diff --git a/view/template_form.xml b/view/template_form.xml
index fe492ef..2e7aee7 100644
--- a/view/template_form.xml
+++ b/view/template_form.xml
@@ -111,6 +111,12 @@ this repository contains the full copyright notices and license terms. -->
+
+
+
+
+
+