From 33ca111eb704d736914323329f37f96e52c7cd37 Mon Sep 17 00:00:00 2001 From: Sergi Almacellas Abellana Date: Thu, 28 Jul 2016 10:12:16 +0200 Subject: [PATCH] Don't update expected quantity when inventory is done issue5749 review21171002 --- inventory.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/inventory.py b/inventory.py index dced093dc0..0ef922f845 100644 --- a/inventory.py +++ b/inventory.py @@ -205,6 +205,9 @@ class Inventory(Workflow, ModelSQL, ModelView): grouping = cls.grouping() to_create, to_write = [], [] for inventory in inventories: + # Once done computation is wrong because include created moves + if inventory.state == 'done': + continue # Compute product quantities if fill: product_ids = None