article. passe à True si l'article est reçu lors d'une livraison

This commit is contained in:
Aurélien Delobelle 2016-08-31 01:06:48 +02:00
parent 990643e5d4
commit 95fd6ed655

View file

@ -1652,6 +1652,8 @@ def order_to_inventory(request, pk):
stock_old = article.stock, stock_old = article.stock,
stock_new = article.stock + q_received) stock_new = article.stock + q_received)
article.stock += q_received article.stock += q_received
if q_received > 0:
article.is_sold = True
article.save() article.save()
messages.success(request, "C'est tout bon !") messages.success(request, "C'est tout bon !")
return redirect('kfet.order') return redirect('kfet.order')