{% extends "base.html" %} {% load static %} {% load i18n %} {% block content %}

{{ product.code }} - {{ product.name }} {% if not product.is_active %} {% translate "Inactif" %} {% endif %}

{% if is_stock_manager %} {% translate "Modifier" %} {% if product.is_active %} {% endif %} {% endif %} {% translate "Retour" %}
{% if is_stock_manager %} {% endif %}
{% translate "Code" %}

{{ product.code }}

SKU

{{ product.sku|default:"-" }}

{% translate "Catégorie" %}

{{ product.category.name_fr|default:"-" }}

{% translate "Unité" %}

{{ product.get_unit_display }} ({{ product.unit }})

{% translate "Prix unitaire" %}

{% if product.price %} {{ product.price|floatformat:2 }} € {% else %} - {% endif %}

{% if product.qr_code %}
{% translate "QR Code" %}
QR Code {{ product.code }}
{% endif %}
{% translate "Stock total" %}

{{ product.total_stock }} {{ product.unit }}

{% translate "Seuil d'alerte" %}

{{ product.threshold }} {{ product.unit }}

{% translate "Statut" %}

{% if product.total_stock < product.threshold %} {% translate "Sous seuil" %} {% else %} {% translate "Stock suffisant" %} {% endif %}

{% if product.description %}
{% translate "Description" %}

{{ product.description }}

{% endif %}
{% translate "Emplacements autorisés" %}
{% if product.authorized_locations.exists %}
{% for loc in product.authorized_locations.all %} {{ loc.warehouse.name }} – {{ loc.name }} {% endfor %}
{% else %}

{% translate "Ce produit est autorisé dans tous les emplacements." %}

{% endif %}
{% if alerts %}
{% translate "Alertes de stock actives" %}
    {% for alert in alerts %}
  • {{ alert.warehouse.name }}: {% translate "Stock actuel:" %} {{ alert.current_stock }} {% translate "| Seuil:" %} {{ alert.threshold }}
  • {% endfor %}
{% endif %} {% if is_stock_manager %} {% endif %}
{% if is_stock_manager %}{% endif %} {% for stock in stocks %} {% if is_stock_manager %} {% endif %} {% empty %} {% endfor %}
{% translate "Entrepôt" %} {% translate "Emplacement" %} {% translate "Quantité" %}
{{ stock.location.warehouse.name }} {{ stock.location.name }} {{ stock.quantity }} {% if stock.can_administer %} {% endif %}
{% translate "Aucun stock enregistré pour ce produit." %}
{% for movement in recent_movements %} {% empty %} {% endfor %}
{% translate "Date" %} {% translate "Type" %} {% translate "Origine" %} {% translate "Destination" %} {% translate "Quantité" %} {% translate "Raison" %}
{{ movement.date|date:"d/m/Y H:i" }} {% if movement.source_location and movement.destination_location %} {{ movement.movement_type }} {% elif movement.destination_location %} {{ movement.movement_type }} {% else %} {{ movement.movement_type }} {% endif %} {% if movement.source_location %} {{ movement.source_location.warehouse.name }} - {{ movement.source_location.name }} {% else %} - {% endif %} {% if movement.destination_location %} {{ movement.destination_location.warehouse.name }} - {{ movement.destination_location.name }} {% else %} - {% endif %} {% if movement.source_location and movement.destination_location %} {{ movement.quantity }} {% elif movement.destination_location %} +{{ movement.quantity }} {% else %} {% if movement.quantity >= 0 %}-{% endif %}{{ movement.quantity }} {% endif %} {{ movement.reason|default:"-" }}
{% translate "Aucun mouvement enregistré." %}
{% for item in pending_orders %} {% empty %} {% endfor %}
{% translate "Commande" %} {% translate "Fournisseur" %} {% translate "Entrepôt" %} {% translate "Emplacement" %} {% translate "Date" %} {% translate "Quantité" %}
#{{ item.purchase_order.id }} {{ item.purchase_order.supplier.name }} {{ item.purchase_order.warehouse.name }} {{ item.location.name }} {{ item.purchase_order.date_ordered|date:"d/m/Y" }} {{ item.quantity }}
{% translate "Aucune commande en cours." %}
{% for item in completed_orders %} {% empty %} {% endfor %}
{% translate "Commande" %} {% translate "Fournisseur" %} {% translate "Entrepôt" %} {% translate "Date commande" %} {% translate "Statut" %} {% translate "Quantité" %}
#{{ item.purchase_order.id }} {{ item.purchase_order.supplier.name }} {{ item.purchase_order.warehouse.name }} {{ item.purchase_order.date_ordered|date:"d/m/Y" }} {% if item.purchase_order.status == 'received' %} {% translate "Reçue" %} {% else %} {% translate "Annulée" %} {% endif %} {{ item.quantity }}
{% translate "Aucune commande dans l'historique." %}
{% if product.is_serialized %}
{{ serialized_items|length }} {% translate "article(s) enregistré(s)" %} {% if is_stock_manager %} {% translate "Enregistrer un article" %} {% endif %}
{% for si in serialized_items %} {% empty %} {% endfor %}
{% translate "Numéro de série" %} {% translate "Statut" %} {% translate "Détenteur" %} {% translate "Emplacement" %}
{{ si.serial_number }} {% if si.status == 'available' %}{{ si.get_status_display }} {% elif si.status == 'assigned' %}{{ si.get_status_display }} {% elif si.status == 'lost' %}{{ si.get_status_display }} {% else %}{{ si.get_status_display }}{% endif %} {{ si.current_holder.name|default:"—" }} {% if si.current_location %}{{ si.current_location.warehouse.name }} — {{ si.current_location.name }}{% else %}—{% endif %}
{% translate "Aucun article enregistré." %}
{% endif %}
{% endblock content %} {% if is_stock_manager %} {% block script %} {% endblock script %} {% endif %}