From ab6d0ed7d24093a4b0ecd93d232e78d0c598f515 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9dric=20Krier?= Date: Wed, 10 Apr 2019 09:55:06 +0200 Subject: [PATCH] Do not get product from last fifo moves but from self move The fifo moves can be empty and so move is undefined. issue7918 --- move.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/move.py b/move.py index ccee0b4db9..fdff042f6e 100644 --- a/move.py +++ b/move.py @@ -74,7 +74,7 @@ class Move(metaclass=PoolMeta): # Compute average cost price unit_price = self.unit_price self.unit_price = Uom.compute_price( - move.product.default_uom, cost_price, self.uom) + self.product.default_uom, cost_price, self.uom) average_cost_price = self._compute_product_cost_price('out') self.unit_price = unit_price