From 3e8a82a6ec06cfbf71d130667e8488c704c89473 Mon Sep 17 00:00:00 2001 From: Alexandre Fayolle Date: Tue, 15 Sep 2015 12:50:24 +0200 Subject: [PATCH] force recomputation of stock.location hierachy before running the tests. This fixes the failure experienced when running the test in --init mode rather than --update mode. --- stock_reserve_sale/test/sale_reserve.yml | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/stock_reserve_sale/test/sale_reserve.yml b/stock_reserve_sale/test/sale_reserve.yml index 7450caad6..a3a81a472 100644 --- a/stock_reserve_sale/test/sale_reserve.yml +++ b/stock_reserve_sale/test/sale_reserve.yml @@ -1,3 +1,12 @@ +- + I force recomputation of stock.location parent left/right +- + !python {model: stock.location}: + # we need this because when running the tests at install time as is done on + # Travis, the hook performing this operation for the new stock reservation + # location is run after the test execution. This causes the stock level + # computation to be wrong at the time the tests are run. + self._parent_store_compute(cr) - I create a product to test the stock reservation -