diff --git a/addons/stock/stock.py b/addons/stock/stock.py index 6bb2d471291..4b9b28409fd 100644 --- a/addons/stock/stock.py +++ b/addons/stock/stock.py @@ -371,6 +371,8 @@ class stock_quant(osv.osv): domain += [('product_id','=',product.id)] + domain res = [] offset = 0 + #id is added at the end of the order to make sure the order is always the same for quants created at the same second + orderby += ', id' while quantity > 0: quants = self.search(cr, uid, domain, order=orderby, limit=10, offset=offset, context=context) if not quants: