From b3b8a471cc3e02488dcc0da991fd1d828978220d Mon Sep 17 00:00:00 2001 From: Florent de Labarre Date: Thu, 21 Dec 2017 13:38:41 +0100 Subject: [PATCH] [FIX] stock: To avoid singleton error In this way, it ensures that a single record is used when calling the function _get_move_values opw:806668 --- addons/stock/models/stock_inventory.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/addons/stock/models/stock_inventory.py b/addons/stock/models/stock_inventory.py index c6bfc0549dd..81d273da48e 100644 --- a/addons/stock/models/stock_inventory.py +++ b/addons/stock/models/stock_inventory.py @@ -454,9 +454,9 @@ class InventoryLine(models.Model): continue diff = line.theoretical_qty - line.product_qty if diff < 0: # found more than expected - vals = self._get_move_values(abs(diff), line.product_id.property_stock_inventory.id, line.location_id.id) + vals = line._get_move_values(abs(diff), line.product_id.property_stock_inventory.id, line.location_id.id) else: - vals = self._get_move_values(abs(diff), line.location_id.id, line.product_id.property_stock_inventory.id) + vals = line._get_move_values(abs(diff), line.location_id.id, line.product_id.property_stock_inventory.id) move = moves.create(vals) if diff > 0: