mirror of
https://github.com/OCA/stock-logistics-warehouse.git
synced 2025-01-21 14:27:28 +02:00
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.
This commit is contained in:
committed by
aliciagarzo
parent
d86489c636
commit
5cf825db0d
@@ -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
|
||||
-
|
||||
@@ -33,9 +42,8 @@
|
||||
-
|
||||
I check Virtual stock of Sorbet after update stock.
|
||||
-
|
||||
!python {model: product.product}: |
|
||||
product = self.browse(cr, uid, ref('stock_reserve.product_sorbet'), context=context)
|
||||
assert product.virtual_available == 10, "Stock is not updated."
|
||||
!python {model: product.product, id: product_sorbet}: |
|
||||
assert self.virtual_available == 10, "Stock is not updated."
|
||||
-
|
||||
I create a stock reservation for 6 kgm
|
||||
-
|
||||
|
||||
Reference in New Issue
Block a user