diff --git a/addons/stock_landed_costs/models/stock_landed_cost.py b/addons/stock_landed_costs/models/stock_landed_cost.py index 06e1437253a..563b8cf0239 100644 --- a/addons/stock_landed_costs/models/stock_landed_cost.py +++ b/addons/stock_landed_costs/models/stock_landed_cost.py @@ -184,7 +184,7 @@ class StockLandedCost(models.Model): for move in self._get_targeted_move_ids(): # it doesn't make sense to make a landed cost for a product that isn't set as being valuated in real time at real cost - if move.product_id.valuation != 'real_time' or move.product_id.cost_method not in ('fifo', 'average') or move.state == 'cancel': + if move.product_id.valuation != 'real_time' or move.product_id.cost_method not in ('fifo', 'average') or move.state == 'cancel' or not move.product_qty: continue vals = { 'product_id': move.product_id.id,