diff --git a/kfet/templates/kfet/order_read.html b/kfet/templates/kfet/order_read.html index beffd359..26bdbbdc 100644 --- a/kfet/templates/kfet/order_read.html +++ b/kfet/templates/kfet/order_read.html @@ -5,10 +5,63 @@ {% block content %} -

-Créée le {{ order.at }} pour {{ order.supplier.name }} -

- - +
+
+
+
+
Créée le: {{ order.at }}
+
Fournisseur: {{ order.supplier.name }}
+
+
+
+
+ {% include 'kfet/base_messages.html' %} +
+
+

Détails

+
+ + + + + + + + + + + {% for orderart in orderarts %} + {% ifchanged orderart.article.category %} + + + + {% endifchanged %} + + + + + + + {% endfor %} + +
ArticleCommandéCommandé (#box)Reçu
{{ orderart.article.category.name }}
{{ orderart.article.name }}{{ orderart.quantity_ordered }} + {% if orderart.article.box_capacity %} + {# c'est une division ! #} + {% widthratio orderart.quantity_ordered orderart.article.box_capacity 1 %} + {% endif %} + + {{ orderart.quantity_received|default_if_none:'' }} +
+
+
+
+

Mail

+
+ +
+
+
+
+
{% endblock %} diff --git a/kfet/views.py b/kfet/views.py index 116c1f3b..7169c392 100644 --- a/kfet/views.py +++ b/kfet/views.py @@ -1356,7 +1356,7 @@ def inventory_create(request): # ----- class OrderList(ListView): - model = Order + queryset = Order.objects.select_related('supplier', 'inventory') template_name = 'kfet/order.html' context_object_name = 'orders' @@ -1507,6 +1507,7 @@ class OrderRead(DetailView): .filter(order=self.object) .order_by('article__category__name', 'article__name') ) + context['orderarts'] = orderarticles mail = ("Bonjour,\n\nNous voudrions pour le ##DATE## à la K-Fêt de " "l'ENS Ulm :") category = 0