Informe de ejecución de orden
{{ title }}
{{ report.executive_summary }}
1. Identificación
| Campo | Valor |
| Orden | {{ report.odoo_order_ref }} |
| Workorder Odoo | {{ report.odoo_workorder_id }} |
| Production Odoo | {{ report.odoo_production_id }} |
| Estado Odoo | {{ report.odoo_state }} |
| Producto | {{ report.product }} |
| Máquina | {{ report.machine_id }} |
| Centro de trabajo | {{ report.odoo_workcenter_name }} |
| Inicio | {{ report.start_ts|dt }} |
| Fin | {{ report.end_ts|dt }} |
2. Indicadores principales
Duración total
{{ report.window_min|num(2) }} min
Tiempo marcha
{{ report.run_min|num(2) }} min
Tiempo parado
{{ report.stop_min|num(2) }} min
Disponibilidad
{{ report.availability_pct|num(2) }} %
Ciclos reales
{{ report.real_cycle_delta }}
Ciclos/min marcha
{{ report.cycles_per_run_min|num(2) }}
Energía
{{ report.kwh_consumed|num(3) }} kWh
Coste paros
{{ report.stop_cost_eur|num(2) }} €
3. Energía y ciclos
| Métrica | Valor |
| Muestras energía | {{ report.energy_samples }} |
| Primera muestra | {{ report.energy_first_ts|dt }} |
| Última muestra | {{ report.energy_last_ts|dt }} |
| kWh inicial | {{ report.start_import_kwh|num(3) }} |
| kWh final | {{ report.end_import_kwh|num(3) }} |
| Consumo | {{ report.kwh_consumed|num(3) }} kWh |
| Potencia media | {{ report.avg_kw|num(3) }} kW |
| Potencia máxima | {{ report.max_kw|num(3) }} kW |
| kWh/ciclo | {{ report.kwh_per_cycle|num(6) }} |
4. Paros
Resumen por causa: {{ report.stop_causes_summary }}
| ID |
Inicio |
Fin |
Duración min |
Causa |
Nota |
Coste € |
Estado |
{% for stop in stops %}
| {{ stop.stop_id }} |
{{ stop.stop_started_at|dt }} |
{{ stop.stop_ended_at|dt }} |
{{ stop.attributed_duration_min|num(2) }} |
{{ stop.cause_code }} |
{{ stop.operator_note or "" }} |
{{ stop.attributed_cost_eur|num(2) }} |
{{ stop.stop_quality_status }} |
{% else %}
| Sin paros imputados a la orden. |
{% endfor %}
5. Calidad del dato
| Métrica | Valor |
| Estado informe | {{ report.final_report_status }} |
| Score calidad técnica | {{ report.technical_quality_score }} |
| Nivel calidad técnica | {{ report.technical_quality_level }} |
| Cobertura telemetría | {{ report.telemetry_sample_coverage_pct|num(2) }} % |
| Gaps > 30 s | {{ report.telemetry_gap_count_30s }} |
| Máximo gap | {{ report.max_sample_gap_s|num(2) }} s |
| Muestras no OK | {{ report.non_ok_samples }} |
| Conversión producción | {{ report.production_conversion_status }} |
| Acción recomendada | {{ report.recommended_action }} |
6. Margin Intelligence
{% if margin %}
Ingreso neto
{{ margin.revenue_net_eur|num(2) }} €
Cliente
{{ margin.customer_name or "Sin cliente" }}
Pedido venta
{{ margin.sale_order_ref or "Sin pedido" }}
Coste paros
{{ margin.stop_cost_eur|num(2) }} €
Coste material
{{ margin.material_cost_estimated_eur|num(2) if margin.material_cost_estimated_eur is not none else "Pendiente" }}
Coste conocido
{{ margin.known_or_estimated_cost_eur|num(2) }} €
Margen estimado
{{ margin.estimated_margin_eur|num(2) if margin.estimated_margin_eur is not none else "No calculable" }}
Estado margen
{% if margin.margin_status == 'PARTIAL_MARGIN_MISSING_RAW_MATERIAL_COST' %}Pendiente coste de materia prima{% elif margin.margin_status == 'ESTIMATED_MARGIN_AVAILABLE' %}Margen estimado disponible{% elif margin.margin_status == 'NO_MARGIN_WITHOUT_REVENUE' %}Sin ingreso de venta vinculado{% else %}{{ margin.margin_status }}{% endif %}
| Métrica | Valor |
| Ingreso neto venta | {{ margin.revenue_net_eur|num(2) if margin.revenue_net_eur is not none else "" }} € |
| Ingreso total venta | {{ margin.revenue_total_eur|num(2) if margin.revenue_total_eur is not none else "" }} € |
| Pedido venta | {{ margin.sale_order_ref or "" }} |
| Cliente | {{ margin.customer_name or "" }} |
| Materia prima consumida | {{ margin.raw_materials_summary or "Sin materia prima detectada" }} |
| Coste materia prima | {{ margin.material_cost_estimated_eur|num(2) if margin.material_cost_estimated_eur is not none else "Pendiente de coste" }} |
| Estado coste materia prima | {% if margin.material_cost_source_status == 'MISSING_RAW_MATERIAL_COST_PARAMETER' %}Pendiente coste de materia prima{% elif margin.material_cost_source_status == 'FROM_RAW_MATERIAL_COSTS' %}Calculado desde coste de materia prima{% elif margin.material_cost_source_status == 'FROM_ODOO_RAW_MATERIAL_VALUE' %}Calculado desde valoración Odoo{% else %}{{ margin.material_cost_source_status }}{% endif %} |
| Coste paros | {{ margin.stop_cost_eur|num(2) }} € |
| Coste conocido o estimado | {{ margin.known_or_estimated_cost_eur|num(2) }} € |
| Margen parcial tras costes conocidos | {{ margin.partial_margin_after_known_costs_eur|num(2) if margin.partial_margin_after_known_costs_eur is not none else "" }} € |
| Margen estimado | {{ margin.estimated_margin_eur|num(2) if margin.estimated_margin_eur is not none else "No calculable todavía" }} |
| % margen estimado | {{ margin.estimated_margin_pct|num(2) if margin.estimated_margin_pct is not none else "No calculable todavía" }} |
| Estado económico | {% if margin.margin_status == 'PARTIAL_MARGIN_MISSING_RAW_MATERIAL_COST' %}Pendiente coste de materia prima{% elif margin.margin_status == 'ESTIMATED_MARGIN_AVAILABLE' %}Margen estimado disponible{% elif margin.margin_status == 'NO_MARGIN_WITHOUT_REVENUE' %}Sin ingreso de venta vinculado{% else %}{{ margin.margin_status }}{% endif %} |
7. Materias primas
| Código |
Materia prima |
Cantidad prevista |
Cantidad consumida |
UdM |
Coste €/kg |
Coste estimado |
Estado |
{% for raw in raw_materials %}
| {{ raw.raw_product_default_code or "" }} |
{{ raw.raw_product_name or "" }} |
{{ raw.planned_qty|num(3) if raw.planned_qty is not none else "" }} |
{{ raw.consumed_qty|num(3) if raw.consumed_qty is not none else "" }} |
{{ raw.raw_uom or "" }} |
{{ raw.material_cost_eur_per_kg|num(4) if raw.material_cost_eur_per_kg is not none else "" }} |
{{ raw.material_cost_estimated_eur_rounded|num(2) if raw.material_cost_estimated_eur_rounded is not none else "" }} |
{% if raw.material_cost_status == 'MISSING_RAW_MATERIAL_COST_PARAMETER' %}Pendiente coste materia prima{% elif raw.material_cost_status == 'FROM_RAW_MATERIAL_COST_PARAMETER' %}Coste manual validado{% elif raw.material_cost_status == 'FROM_ODOO_STOCK_MOVE_VALUE' %}Coste desde Odoo{% else %}{{ raw.material_cost_status }}{% endif %} |
{% else %}
| Sin materias primas detectadas para la orden. |
{% endfor %}
{% else %}
No hay datos comerciales o económicos vinculados a esta orden.
{% endif %}
8. Timeline
| Hora |
Tipo |
Evento |
Nivel |
Causa |
Duración |
Coste |
Descripción |
{% for event in timeline %}
| {{ event.event_ts|dt }} |
{{ event.event_type }} |
{{ event.event_label }} |
{{ event.severity }} |
{{ event.cause_code or "" }} |
{{ event.duration_min|num(2) if event.duration_min is not none else "" }} |
{{ event.cost_eur|num(2) if event.cost_eur is not none else "" }} |
{{ event.description }} |
{% endfor %}
Informe generado desde MESAVAULT Edge-OEE usando vistas SQL de PostgreSQL.