{% extends 'base.html' %} {% load static %} {% block title %}Visualisation du procès-verbal n°{{ pv.numero|default:"" }} - Contrôle Technique{% endblock %} {% block content %}
{% if messages %}
{% for message in messages %} {% endfor %}
{% endif %}
Actions disponibles
Gérez et exportez ce procès-verbal
{% if pv.statut == 'brouillon' %} Modifier {% endif %} Imprimer Retour
PROCÈS-VERBAL DE CONTRÔLE TECHNIQUE
{% if pv.numero %} N° {{ pv.numero }} {% endif %}
Créé le {{ pv.date_creation|date:"d/m/Y H:i" }} {% if pv.date_modification %}
Modifié le {{ pv.date_modification|date:"d/m/Y H:i" }} {% endif %}
Type de PV : {{ pv.type_pv|default:"Non spécifié" }}
Client : {{ pv.client.nom|default:"Non spécifié" }} {% if pv.client.email %}
{{ pv.client.email }}{% endif %} {% if pv.client.telephone %}
{{ pv.client.telephone }}{% endif %}
Date de visite : {{ pv.date_visite|date:"d/m/Y"|default:"Non spécifiée" }}
Lieu : {{ pv.lieu|default:"Non spécifié" }}
Inspecteur : {% if user.username %} {{user.username}} {% else %} Non assigné {% endif %}
Référence dossier : {{ pv.reference_dossier|default:"-" }}
Validité : {% if pv.date_validite %} {{ pv.date_validite|date:"d/m/Y" }} {% else %} Non définie {% endif %}
Version : {{ pv.version|default:"1.0" }}
Objet du contrôle

{{ pv.objet_controle.nom_projet|default:"Aucun objet spécifié"|linebreaks }}

Observations générales

{{ pv.observations_generales|default:"Aucune observation"|linebreaks }}

Points de contrôle

{% if pv.controles.all %}
{% for controle in pv.controles.all %} {% endfor %}
Ouvrage Élément d'ouvrage Point de contrôle Statut Observations Photos
{{ controle.point_controle.element.ouvrage.nom|default:"-" }} {{ controle.point_controle.element.nom }} {{ controle.point_controle.point_de_controle|cut:"Point de contrôle : "|cut:"Point de contrôle:" }} {{ controle.get_statut_display }} {{ controle.observation|default:"-" }} {% with photos=controle.photos.all %} {% if photos %}
{% else %} - {% endif %} {% endwith %}
{% else %}
Aucun point de contrôle n'a été enregistré pour ce procès-verbal.
{% endif %}
{% if recommandations %}
Recommandations générales
    {% for rec in recommandations %}
  • {{ rec.ordre }} {{ rec.texte }}
  • {% endfor %}
{% endif %}
Participants {{ pv.participants.all|length }}
{% with participants_list=pv.participants.all %} {% if participants_list %}
{% for participant_pv in participants_list %}
{# Gestion flexible du nom #} {% if participant_pv.nom %} {{ participant_pv.nom }} {% else %} Participant #{{ forloop.counter }} {% endif %}
{% if participant_pv.fonction %} {{ participant_pv.fonction }} {% else %} Participant {% endif %}
{# Gestion de la signature #} {% if participant_pv.signature %} {% else %} Non signé {% endif %}
{# Modal pour la signature #} {% if participant_pv.signature %} {% endif %} {% endfor %}
{% else %}
Aucun participant enregistré.
{% endif %} {% endwith %}
Informations complémentaires
  • Création : {{ pv.date_creation|date:"d/m/Y H:i" }}
  • {% if pv.date_modification %}
  • Modification : {{ pv.date_modification|date:"d/m/Y H:i" }}
  • {% endif %}
  • Créé par : {{ pv.createur.get_full_name|default:pv.createur.username }}
  • {% if pv.date_finalisation %}
  • Finalisation : {{ pv.date_finalisation|date:"d/m/Y H:i" }}
  • {% endif %} {% if pv.mots_cles %}
  • Mots-clés :
    {% for mot in pv.mots_cles.split %} {{ mot }} {% endfor %}
  • {% endif %}
{% if documents_joints %}
Documents joints
{% for doc in documents_joints %}
{{ doc.nom }}
{{ doc.taille|filesizeformat }}
{% endfor %}
{% endif %}
{% for element in elements_controle %} {% if element.photos.all %} {% endif %} {% endfor %} {% for participant in participants %} {% if participant.signature %} {% endif %} {% endfor %} {% if historique_validations %}
Historique des validations
{% for validation in historique_validations %}
{{ validation.get_statut_display }}
{{ validation.date|date:"d/m/Y H:i" }}

{{ validation.utilisateur.get_full_name|default:validation.utilisateur.username }} {% if validation.commentaire %}
{{ validation.commentaire }} {% endif %}

{% endfor %}
{% endif %} {% endblock %} {% block extra_js %} {% endblock %}