diff --git a/addons/purchase/test/fifo_price.yml b/addons/purchase/test/fifo_price.yml index 63b42706191..1b8984c7f89 100644 --- a/addons/purchase/test/fifo_price.yml +++ b/addons/purchase/test/fifo_price.yml @@ -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,) \ No newline at end of file + 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,)