[FIX] purchase: added a delay of 1 second in fifo_price, as the behavior is not deterministic for quants created the same second
bzr revid: qdp-launchpad@openerp.com-20130918132718-oap7zov1z8dqifs3
This commit is contained in:
parent
5b5472508b
commit
b59fd430fd
|
@ -297,6 +297,11 @@
|
|||
!python {model: stock.picking}: |
|
||||
picking_obj = self.browse(cr, uid, ref("outgoing_fifo_shipment_neg"))
|
||||
picking_obj.do_partial(context=context)
|
||||
-
|
||||
The behavior of fifo/lifo is not garantee if the quants are created at the same second, so i just wait one second
|
||||
-
|
||||
import time
|
||||
time.sleep(1)
|
||||
-
|
||||
Let us create another out of 400 kg
|
||||
-
|
||||
|
@ -392,4 +397,4 @@
|
|||
quant_obj = self.pool.get("stock.quant")
|
||||
quants = quant_obj.search(cr, uid, [('product_id','=',ref("product_fifo_negative"))])
|
||||
print "Quants:", [(x.qty, x.location_id.name, x.in_date, x.cost, x.id) for x in quant_obj.browse(cr, uid, quants)]
|
||||
assert self.browse(cr, uid, ref("product_fifo_negative")).standard_price == 65.0, "Product price not updated accordingly. %s found instead of 65" %(self.browse(cr, uid, ref("product_fifo_negative")).standard_price,)
|
||||
assert self.browse(cr, uid, ref("product_fifo_negative")).standard_price == 65.0, "Product price not updated accordingly. %s found instead of 65" %(self.browse(cr, uid, ref("product_fifo_negative")).standard_price,)
|
||||
|
|
Loading…
Reference in New Issue