diff --git a/addons/stock/stock.py b/addons/stock/stock.py index dd81a8e879d..b1e6b00213d 100644 --- a/addons/stock/stock.py +++ b/addons/stock/stock.py @@ -571,11 +571,11 @@ class stock_quant(osv.osv): return res def _quants_get_fifo(self, cr, uid, location, product, quantity, domain=[], context=None): - order = 'in_date' + order = 'in_date, id' return self._quants_get_order(cr, uid, location, product, quantity, domain, order, context=context) def _quants_get_lifo(self, cr, uid, location, product, quantity, domain=[], context=None): - order = 'in_date desc' + order = 'in_date desc, id desc' return self._quants_get_order(cr, uid, location, product, quantity, domain, order, context=context) def _location_owner(self, cr, uid, quant, location, context=None): diff --git a/addons/stock_dropshipping/test/lifo_price.yml b/addons/stock_dropshipping/test/lifo_price.yml index 1ab280350e8..b54e6529405 100644 --- a/addons/stock_dropshipping/test/lifo_price.yml +++ b/addons/stock_dropshipping/test/lifo_price.yml @@ -74,12 +74,6 @@ - !workflow {model: purchase.order, action: purchase_confirm, ref: purchase_order_lifo2} - - The behavior of fifo/lifo is not garantee if the quants are created at the same second, so i just wait one second -- - !python {model: stock.picking}: | - import time - time.sleep(1) -- Process the reception of purchase order 2 - !python {model: stock.picking}: |