diff --git a/addons/purchase/models/stock.py b/addons/purchase/models/stock.py index 4edd90aafbb..62d9a1d1b30 100644 --- a/addons/purchase/models/stock.py +++ b/addons/purchase/models/stock.py @@ -48,7 +48,7 @@ class StockMove(models.Model): def _get_price_unit(self): """ Returns the unit price for the move""" self.ensure_one() - if self.purchase_line_id: + if self.purchase_line_id and self.product_id.id == self.purchase_line_id.product_id.id: line = self.purchase_line_id order = line.order_id price_unit = line.price_unit