[FIX] stock: now, the behavior fifo/lifo IS garanteed even if quants are created at the same second
bzr revid: qdp-launchpad@openerp.com-20140318122726-ggjm0sxn8lzzl3pb
This commit is contained in:
parent
e202c84b27
commit
835fbef798
|
@ -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):
|
||||
|
|
|
@ -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}: |
|
||||
|
|
Loading…
Reference in New Issue