diff --git a/addons/stock/models/stock_move_line.py b/addons/stock/models/stock_move_line.py index bb93b1c224b..f914f8aa00f 100644 --- a/addons/stock/models/stock_move_line.py +++ b/addons/stock/models/stock_move_line.py @@ -141,7 +141,7 @@ class StockMoveLine(models.Model): help him. This onchange will warn him if he set `qty_done` to a non-supported value. """ res = {} - if self.product_id.tracking == 'serial': + if self.qty_done and self.product_id.tracking == 'serial': if float_compare(self.qty_done, 1.0, precision_rounding=self.move_id.product_id.uom_id.rounding) != 0: message = _('You can only process 1.0 %s for products with unique serial number.') % self.product_id.uom_id.name res['warning'] = {'title': _('Warning'), 'message': message}