Commit c85c5112 authored by Patrick's avatar Patrick

Add the possibility to inform the responsible of a sub-group to be keep...

Add the possibility to inform the responsible of a sub-group to be keep informed of the orders of the members of this sub-group.
parent fc9a5506
...@@ -165,8 +165,8 @@ class LUTDeliveryPointAdmin(LUTAdmin): ...@@ -165,8 +165,8 @@ class LUTDeliveryPointAdmin(LUTAdmin):
def get_fields(self, request, obj=None): def get_fields(self, request, obj=None):
if obj is None: if obj is None:
return ['short_name', 'is_active', 'customer_responsible', 'price_list_multiplier', 'transport', 'min_transport'] return ['short_name', 'is_active', 'customer_responsible', 'inform_customer_responsible', 'price_list_multiplier', 'transport', 'min_transport']
return ['short_name', 'is_active', 'customer_responsible', 'price_list_multiplier', 'transport', 'min_transport', 'customers'] return ['short_name', 'is_active', 'customer_responsible', 'inform_customer_responsible', 'price_list_multiplier', 'transport', 'min_transport', 'customers']
class LUTDepartmentForCustomerAdmin(LUTAdmin): class LUTDepartmentForCustomerAdmin(LUTAdmin):
......
...@@ -253,12 +253,12 @@ def export_order_2_1_customer(customer, filename, permanence, sender_email, send ...@@ -253,12 +253,12 @@ def export_order_2_1_customer(customer, filename, permanence, sender_email, send
to_email_customer.append(customer.email2) to_email_customer.append(customer.email2)
if customer_invoice.delivery is not None: if customer_invoice.delivery is not None:
delivery_point = customer_invoice.delivery delivery_point = customer_invoice.delivery
# if delivery_point.delivery_point.customer_responsible is not None: if delivery_point.delivery_point.inform_customer_responsible and delivery_point.delivery_point.customer_responsible is not None:
# customer_responsible = delivery_point.delivery_point.customer_responsible customer_responsible = delivery_point.delivery_point.customer_responsible
# if customer_responsible.id != customer.id: if customer_responsible.id != customer.id:
# to_email_customer.append(customer_responsible.user.email) to_email_customer.append(customer_responsible.user.email)
# if customer_responsible.email2: if customer_responsible.email2:
# to_email_customer.append(customer_responsible.email2) to_email_customer.append(customer_responsible.email2)
else: else:
delivery_point = EMPTY_STRING delivery_point = EMPTY_STRING
customer_last_balance, customer_on_hold_movement, customer_payment_needed, customer_order_amount = payment_message( customer_last_balance, customer_on_hold_movement, customer_payment_needed, customer_order_amount = payment_message(
......
...@@ -7,8 +7,8 @@ msgid "" ...@@ -7,8 +7,8 @@ msgid ""
msgstr "" msgstr ""
"Project-Id-Version: Repanier\n" "Project-Id-Version: Repanier\n"
"Report-Msgid-Bugs-To: \n" "Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2017-03-21 19:36+0100\n" "POT-Creation-Date: 2017-03-23 09:40+0100\n"
"PO-Revision-Date: 2017-03-21 19:58+0100\n" "PO-Revision-Date: 2017-03-23 13:59+0100\n"
"Last-Translator: Patrick Colmant <pcolmant@gmail.com>\n" "Last-Translator: Patrick Colmant <pcolmant@gmail.com>\n"
"Language-Team: Patrick Colmant <pcolmant@gmail.com>\n" "Language-Team: Patrick Colmant <pcolmant@gmail.com>\n"
"Language: fr\n" "Language: fr\n"
...@@ -59,7 +59,7 @@ msgid "producer" ...@@ -59,7 +59,7 @@ msgid "producer"
msgstr "Fournisseur" msgstr "Fournisseur"
#: admin/admin_filter.py:186 admin/admin_filter.py:207 #: admin/admin_filter.py:186 admin/admin_filter.py:207
#: models/permanence.py:472 models/purchase.py:174 #: models/permanence.py:479 models/purchase.py:174
msgid "permanence" msgid "permanence"
msgstr "permanence" msgstr "permanence"
...@@ -1416,7 +1416,7 @@ msgstr "Commandes ouvertes" ...@@ -1416,7 +1416,7 @@ msgstr "Commandes ouvertes"
msgid "wait for close" msgid "wait for close"
msgstr "En cours de clôture" msgstr "En cours de clôture"
#: const.py:73 models/deliveryboard.py:107 models/permanence.py:465 #: const.py:73 models/deliveryboard.py:107 models/permanence.py:472
msgid "orders closed" msgid "orders closed"
msgstr "Commandes clôturées" msgstr "Commandes clôturées"
...@@ -1636,7 +1636,7 @@ msgstr "" ...@@ -1636,7 +1636,7 @@ msgstr ""
"⚠ Mail non transmis au producteur %s car le minimum de commande n'a pas été " "⚠ Mail non transmis au producteur %s car le minimum de commande n'a pas été "
"atteint." "atteint."
#: email/email_order.py:274 #: email/email_order.py:273
msgid "/!\\ Order cancelled" msgid "/!\\ Order cancelled"
msgstr "⚠ Commande annulée" msgstr "⚠ Commande annulée"
...@@ -2077,7 +2077,7 @@ msgstr "Commentaire" ...@@ -2077,7 +2077,7 @@ msgstr "Commentaire"
msgid "delivery date" msgid "delivery date"
msgstr "Date de livraison" msgstr "Date de livraison"
#: models/deliveryboard.py:37 models/permanence.py:54 models/permanence.py:419 #: models/deliveryboard.py:37 models/permanence.py:54 models/permanence.py:426
msgid "permanence_status" msgid "permanence_status"
msgstr "Statut" msgstr "Statut"
...@@ -2273,6 +2273,11 @@ msgstr "Description" ...@@ -2273,6 +2273,11 @@ msgstr "Description"
msgid "production mode" msgid "production mode"
msgstr "Label" msgstr "Label"
#: models/lut.py:84
msgid "inform_customer_responsible"
msgstr ""
"Informer le consommateur responsable des commandes passées par ses membres"
#: models/lut.py:85 #: models/lut.py:85
msgid "with entitled customer" msgid "with entitled customer"
msgstr "consommateurs ayant droit" msgstr "consommateurs ayant droit"
...@@ -2565,11 +2570,11 @@ msgstr "avec point de livraison" ...@@ -2565,11 +2570,11 @@ msgstr "avec point de livraison"
msgid "automatically_closed" msgid "automatically_closed"
msgstr "Clôturer ET transmettre automatiquement les commandes" msgstr "Clôturer ET transmettre automatiquement les commandes"
#: models/permanence.py:185 models/permanence.py:266 models/permanence.py:321 #: models/permanence.py:185 models/permanence.py:273 models/permanence.py:328
msgid "Show" msgid "Show"
msgstr "Montrer" msgstr "Montrer"
#: models/permanence.py:185 models/permanence.py:266 models/permanence.py:321 #: models/permanence.py:185 models/permanence.py:273 models/permanence.py:328
msgid "Hide" msgid "Hide"
msgstr "Masquer" msgstr "Masquer"
...@@ -2581,39 +2586,39 @@ msgstr "Pas d'offre" ...@@ -2581,39 +2586,39 @@ msgstr "Pas d'offre"
msgid "producers in this permanence" msgid "producers in this permanence"
msgstr "Offres de" msgstr "Offres de"
#: models/permanence.py:270 #: models/permanence.py:277
msgid "No purchase" msgid "No purchase"
msgstr "Pas d'achat" msgstr "Pas d'achat"
#: models/permanence.py:273 #: models/permanence.py:280
msgid "customers in this permanence" msgid "customers in this permanence"
msgstr "Achats par" msgstr "Achats par"
#: models/permanence.py:325 #: models/permanence.py:332
msgid "Empty board" msgid "Empty board"
msgstr "Tableau vide" msgstr "Tableau vide"
#: models/permanence.py:328 models/permanenceboard.py:28 #: models/permanence.py:335 models/permanenceboard.py:28
msgid "permanence board" msgid "permanence board"
msgstr "Tableau des tâches" msgstr "Tableau des tâches"
#: models/permanence.py:473 #: models/permanence.py:480
msgid "permanences" msgid "permanences"
msgstr "permanences" msgstr "permanences"
#: models/permanence.py:483 #: models/permanence.py:490
msgid "X in preparation" msgid "X in preparation"
msgstr "en préparation" msgstr "en préparation"
#: models/permanence.py:484 #: models/permanence.py:491
msgid "Xs in preparation" msgid "Xs in preparation"
msgstr "en préparation" msgstr "en préparation"
#: models/permanence.py:490 #: models/permanence.py:497
msgid "X done" msgid "X done"
msgstr "en facturation" msgstr "en facturation"
#: models/permanence.py:491 #: models/permanence.py:498
msgid "Xs done" msgid "Xs done"
msgstr "en facturation" msgstr "en facturation"
...@@ -3260,7 +3265,7 @@ msgid "Purchase(s) :" ...@@ -3260,7 +3265,7 @@ msgid "Purchase(s) :"
msgstr "Achat(s) :" msgstr "Achat(s) :"
#: templates/repanier/customer_invoice_form.html:16 #: templates/repanier/customer_invoice_form.html:16
#: templates/repanier/customer_invoice_form.html:35 tools.py:1189 #: templates/repanier/customer_invoice_form.html:35 tools.py:1184
msgid "Delivery point" msgid "Delivery point"
msgstr "Point de livraison" msgstr "Point de livraison"
...@@ -3946,21 +3951,21 @@ msgstr "Le solde de votre compte est suffisant" ...@@ -3946,21 +3951,21 @@ msgstr "Le solde de votre compte est suffisant"
msgid "Closed" msgid "Closed"
msgstr "Clôturé" msgstr "Clôturé"
#: tools.py:833 tools.py:1038 views/order_select_ajax.py:85 #: tools.py:833 tools.py:1033 views/order_select_ajax.py:85
msgid "Sold out" msgid "Sold out"
msgstr "Épuisé" msgstr "Épuisé"
#: tools.py:1122 views/delivery_select_ajax.py:74 #: tools.py:1117 views/delivery_select_ajax.py:74
msgid "Please, select a delivery point" msgid "Please, select a delivery point"
msgstr "Veuillez sélectionner un point de livraison" msgstr "Veuillez sélectionner un point de livraison"
#: tools.py:1128 views/delivery_select_ajax.py:72 #: tools.py:1123 views/delivery_select_ajax.py:72
msgid "No delivery point is open for you. You can not place order." msgid "No delivery point is open for you. You can not place order."
msgstr "" msgstr ""
"Vous ne pouvez pas passer commande car aucun point de livraison n'est ouvert " "Vous ne pouvez pas passer commande car aucun point de livraison n'est ouvert "
"pour vous." "pour vous."
#: tools.py:1148 #: tools.py:1143
#, python-format #, python-format
msgid "" msgid ""
"The shipping costs for this delivery point amount to %(transport)s for " "The shipping costs for this delivery point amount to %(transport)s for "
...@@ -3969,14 +3974,14 @@ msgstr "" ...@@ -3969,14 +3974,14 @@ msgstr ""
"Pour ce point de livraison, %(transport)s de frais sont ajoutés aux " "Pour ce point de livraison, %(transport)s de frais sont ajoutés aux "
"commandes de moins de %(min_transport)s." "commandes de moins de %(min_transport)s."
#: tools.py:1155 #: tools.py:1150
#, python-format #, python-format
msgid "The shipping costs for this delivery point amount to %(transport)s." msgid "The shipping costs for this delivery point amount to %(transport)s."
msgstr "" msgstr ""
"Pour ce point de livraison, %(transport)s de frais seront ajoutés à votre " "Pour ce point de livraison, %(transport)s de frais seront ajoutés à votre "
"commande." "commande."
#: tools.py:1165 #: tools.py:1160
#, python-format #, python-format
msgid "" msgid ""
"A price increase of %(increase)s %% of the total invoiced is due for this " "A price increase of %(increase)s %% of the total invoiced is due for this "
...@@ -3985,7 +3990,7 @@ msgstr "" ...@@ -3985,7 +3990,7 @@ msgstr ""
"De plus une surcharge de %(increase)s %% est appliqué au total facturé. " "De plus une surcharge de %(increase)s %% est appliqué au total facturé. "
"Celle-ci ne s'applique ni aux consignes, ni aux frais." "Celle-ci ne s'applique ni aux consignes, ni aux frais."
#: tools.py:1171 #: tools.py:1166
#, python-format #, python-format
msgid "" msgid ""
"A price decrease of %(decrease)s %% of the total invoiced is given for this " "A price decrease of %(decrease)s %% of the total invoiced is given for this "
...@@ -3994,7 +3999,7 @@ msgstr "" ...@@ -3994,7 +3999,7 @@ msgstr ""
"De plus une réduction de %(decrease)s %% est appliqué au total facturé. " "De plus une réduction de %(decrease)s %% est appliqué au total facturé. "
"Celle-ci ne s'applique ni aux consignes, ni aux frais." "Celle-ci ne s'applique ni aux consignes, ni aux frais."
#: tools.py:1178 #: tools.py:1173
#, python-format #, python-format
msgid "" msgid ""
"A price increase of %(increase)s %% of the total invoiced is due for this " "A price increase of %(increase)s %% of the total invoiced is due for this "
...@@ -4003,7 +4008,7 @@ msgstr "" ...@@ -4003,7 +4008,7 @@ msgstr ""
"Pour ce point de livraison, une surcharge de %(increase)s %% est appliqué " "Pour ce point de livraison, une surcharge de %(increase)s %% est appliqué "
"au total facturé (hors consigne)." "au total facturé (hors consigne)."
#: tools.py:1184 #: tools.py:1179
#, python-format #, python-format
msgid "" msgid ""
"A price decrease of %(decrease)s %% of the total invoiced is given for this " "A price decrease of %(decrease)s %% of the total invoiced is given for this "
...@@ -4012,40 +4017,40 @@ msgstr "" ...@@ -4012,40 +4017,40 @@ msgstr ""
"Pour ce point de livraison, une réduction de %(decrease)s %% est appliqué " "Pour ce point de livraison, une réduction de %(decrease)s %% est appliqué "
"au total facturé (hors consigne)." "au total facturé (hors consigne)."
#: tools.py:1227 tools.py:1233 #: tools.py:1222 tools.py:1228
msgid "An unconfirmed order will be canceled." msgid "An unconfirmed order will be canceled."
msgstr "⚠ Les commandes non confirmées sont annulées." msgstr "⚠ Les commandes non confirmées sont annulées."
#: tools.py:1228 #: tools.py:1223
msgid "Confirm this order and receive an email containing its summary." msgid "Confirm this order and receive an email containing its summary."
msgstr " ➜ Confirmer ma commande et recevoir un ✉ récapitulatif." msgstr " ➜ Confirmer ma commande et recevoir un ✉ récapitulatif."
#: tools.py:1234 #: tools.py:1229
msgid "Verify my order content before validating it." msgid "Verify my order content before validating it."
msgstr "➜ Passer à l'étape de confirmation de ma commande." msgstr "➜ Passer à l'étape de confirmation de ma commande."
#: tools.py:1248 #: tools.py:1243
msgid "Receive an email containing this order summary." msgid "Receive an email containing this order summary."
msgstr "Recevoir un ✉ récapitulatif de ma commande." msgstr "Recevoir un ✉ récapitulatif de ma commande."
#: tools.py:1301 #: tools.py:1296
#, python-format #, python-format
msgid "" msgid ""
"Your order is confirmed. An email containing this order summary has been " "Your order is confirmed. An email containing this order summary has been "
"sent to %s." "sent to %s."
msgstr "Commande confirmée : un ✉ récapitulatif de celle-ci a été envoyé à %s" msgstr "Commande confirmée : un ✉ récapitulatif de celle-ci a été envoyé à %s"
#: tools.py:1303 #: tools.py:1298
#, python-format #, python-format
msgid "An email containing this order summary has been sent to %s." msgid "An email containing this order summary has been sent to %s."
msgstr "Un ✉ récapitulatif de la commande a été envoyé à %s." msgstr "Un ✉ récapitulatif de la commande a été envoyé à %s."
#: tools.py:1334 #: tools.py:1329
#, python-format #, python-format
msgid "Cancelled qty : %s" msgid "Cancelled qty : %s"
msgstr "Qté non confirmée : %s" msgstr "Qté non confirmée : %s"
#: tools.py:1647 #: tools.py:1642
msgid "" msgid ""
"You can increase the order quantities as long as the orders are open for " "You can increase the order quantities as long as the orders are open for "
"your delivery point." "your delivery point."
...@@ -4053,13 +4058,13 @@ msgstr "" ...@@ -4053,13 +4058,13 @@ msgstr ""
"Vous pouvez ajouter des produits et augmenter quantités commandés aussi " "Vous pouvez ajouter des produits et augmenter quantités commandés aussi "
"longtemps que les commandes sont ouvertes pour votre point de livraison." "longtemps que les commandes sont ouvertes pour votre point de livraison."
#: tools.py:1651 #: tools.py:1646
msgid "You can increase the order quantities as long as the orders are open." msgid "You can increase the order quantities as long as the orders are open."
msgstr "" msgstr ""
"Vous pouvez ajouter des produits et augmenter quantités commandés aussi " "Vous pouvez ajouter des produits et augmenter quantités commandés aussi "
"longtemps que les commandes sont ouvertes." "longtemps que les commandes sont ouvertes."
#: tools.py:1656 #: tools.py:1651
msgid "" msgid ""
"You can change the order quantities as long as the orders are open for your " "You can change the order quantities as long as the orders are open for your "
"delivery point." "delivery point."
...@@ -4067,17 +4072,17 @@ msgstr "" ...@@ -4067,17 +4072,17 @@ msgstr ""
"Vous pouvez modifier les produits et quantités commandés aussi longtemps que " "Vous pouvez modifier les produits et quantités commandés aussi longtemps que "
"les commandes sont ouvertes pour votre point de livraison." "les commandes sont ouvertes pour votre point de livraison."
#: tools.py:1660 #: tools.py:1655
msgid "You can change the order quantities as long as the orders are open." msgid "You can change the order quantities as long as the orders are open."
msgstr "" msgstr ""
"Vous pouvez modifier les produits et quantités commandés aussi longtemps que " "Vous pouvez modifier les produits et quantités commandés aussi longtemps que "
"les commandes sont ouvertes." "les commandes sont ouvertes."
#: tools.py:1665 #: tools.py:1660
msgid "The orders are closed for your delivery point." msgid "The orders are closed for your delivery point."
msgstr "Les commandes sont clôturées pour votre point de livraison." msgstr "Les commandes sont clôturées pour votre point de livraison."
#: tools.py:1669 views/order_init_ajax.py:92 #: tools.py:1664 views/order_init_ajax.py:92
msgid "The orders are closed." msgid "The orders are closed."
msgstr "Les commandes sont clôturées." msgstr "Les commandes sont clôturées."
......
...@@ -81,7 +81,7 @@ class LUT_DeliveryPoint(MPTTModel, TranslatableModel): ...@@ -81,7 +81,7 @@ class LUT_DeliveryPoint(MPTTModel, TranslatableModel):
'Customer', verbose_name=_("customer_responsible"), 'Customer', verbose_name=_("customer_responsible"),
help_text=_("Invoices are sent to this consumer who is responsible for collecting the payments."), help_text=_("Invoices are sent to this consumer who is responsible for collecting the payments."),
on_delete=models.PROTECT, blank=True, null=True, default=None) on_delete=models.PROTECT, blank=True, null=True, default=None)
# with_entitled_customer = models.BooleanField(_("with entitled customer"), default=False) inform_customer_responsible = models.BooleanField(_("inform_customer_responsible"), default=False)
closed_group = models.BooleanField(_("with entitled customer"), default=False) closed_group = models.BooleanField(_("with entitled customer"), default=False)
price_list_multiplier = models.DecimalField( price_list_multiplier = models.DecimalField(
_("Delivery point price list multiplier"), _("Delivery point price list multiplier"),
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment