From 689947686894773ea977be487731069ae2406476 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Aur=C3=A9lien=20Delobelle?= Date: Sat, 3 Sep 2016 18:04:00 +0200 Subject: [PATCH] Fix calcul stock error inventaire --- kfet/models.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/kfet/models.py b/kfet/models.py index 07b56f2e..bbebd3e3 100644 --- a/kfet/models.py +++ b/kfet/models.py @@ -395,7 +395,7 @@ class InventoryArticle(models.Model): def save(self, *args, **kwargs): # S'il s'agit d'un inventaire provenant d'une livraison, il n'y a pas # d'erreur - if not hasattr(self.inventory, 'order'): + if not self.inventory.order: self.stock_error = self.stock_new - self.stock_old super(InventoryArticle, self).save(*args, **kwargs)