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 @@