Do not get product from last fifo moves but from self move

The fifo moves can be empty and so move is undefined.

issue7918
This commit is contained in:
Cédric Krier committed 2019-04-10 09:55:06 +02:00
1 parent 851113bdf8
commit ab6d0ed7d2
1 file changed
+1 -1
+1 -1
View File
@@ -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