From 90b2a928949d4972962cf8fce56fcc6861991947 Mon Sep 17 00:00:00 2001 From: Alexis M Date: Mon, 23 Sep 2019 21:41:53 +0200 Subject: [PATCH] Make it work, again. --- copanier/models.py | 2 ++ copanier/templates/emails/order_summary.txt | 9 +++------ copanier/templates/includes/delivery_head.html | 2 +- copanier/templates/includes/delivery_table.html | 2 +- 4 files changed, 7 insertions(+), 8 deletions(-) diff --git a/copanier/models.py b/copanier/models.py index 3c9f69b..daf2a02 100644 --- a/copanier/models.py +++ b/copanier/models.py @@ -154,6 +154,7 @@ class Groups(PersistedBase): class Producer(Base): id: str referent: str = "" + tel_referent: str = "" contact: str = "" location: str = "" @@ -169,6 +170,7 @@ class Product(Base): img: str = "" packing: int = None producer: str = "" + rupture: bool = False def __str__(self): out = self.name diff --git a/copanier/templates/emails/order_summary.txt b/copanier/templates/emails/order_summary.txt index 705b22b..cb11023 100644 --- a/copanier/templates/emails/order_summary.txt +++ b/copanier/templates/emails/order_summary.txt @@ -1,14 +1,11 @@ Salut salut, -Voici le résumé de votre commande «{{ delivery.name }}» +Voici le résumé de votre commande «{{ delivery.name }}» pour « {{ request['user']['group_name'] }} ». Produit | Prix unitaire | Quantité -{% for product in delivery.products %} -{% if order[product].quantity %} -{{ product.name }} | {{ product.price }} € | {{ order[product].quantity }} -{% endif %} -{% endfor %} +{% for product in delivery.products %}{% if order[product].quantity %}{{ product.name }} | {{ product.price }} € | {{ order[product].quantity }} +{% endif %}{% endfor %} Total: {{ order.total(delivery.products) if order else 0 }} € diff --git a/copanier/templates/includes/delivery_head.html b/copanier/templates/includes/delivery_head.html index 0e9c9af..7bec039 100644 --- a/copanier/templates/includes/delivery_head.html +++ b/copanier/templates/includes/delivery_head.html @@ -1,7 +1,7 @@