From 95fd6ed655ff1ba83cc300260e12c7e923f6d2ea Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Aur=C3=A9lien=20Delobelle?= Date: Wed, 31 Aug 2016 01:06:48 +0200 Subject: [PATCH] =?UTF-8?q?article.=20passe=20=C3=A0=20True=20si=20l'artic?= =?UTF-8?q?le=20est=20re=C3=A7u=20lors=20d'une=20livraison?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- kfet/views.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/kfet/views.py b/kfet/views.py index 844ed8ce..26fe9164 100644 --- a/kfet/views.py +++ b/kfet/views.py @@ -1652,6 +1652,8 @@ def order_to_inventory(request, pk): stock_old = article.stock, stock_new = article.stock + q_received) article.stock += q_received + if q_received > 0: + article.is_sold = True article.save() messages.success(request, "C'est tout bon !") return redirect('kfet.order')