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:
1 parent
851113bdf8
commit
ab6d0ed7d2
1 file changed
+1
-1
@@ -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
|
||||
|
||||
|
||||
Reference in new issue
Block a user