summaryrefslogtreecommitdiff
path: root/addons/stock/tests
diff options
context:
space:
mode:
authorsvs-odoo <svs@odoo.com>2020-03-10 13:10:09 +0000
committersvs-odoo <svs@odoo.com>2020-03-25 10:26:38 +0000
commite729af8dd9d9fac8540524de506f6689dd69c15e (patch)
tree13efeb076730561c358b823fff7cc8cdd71e0919 /addons/stock/tests
parent4cb21e1a95bb9ede0b0dd27ba6a892fc6a477373 (diff)
[FIX] stock: don't validate WH/OUT/0005
Before this commit the demo delivery WH/OUT/0005 is plan then validated. But as this delivery is the one used as example in the barcode PDF, it could be usefull for demonstration to keep it as to process. So, this commit keeps it only as ready, and also increases the stock amount of Desk Combination to be able to process this delivery without any issue. task-2199747 closes odoo/odoo#48320 X-original-commit: 652ee46e8adc35bae4f89bf9802f12bd1c424c8d Related: odoo/enterprise#9474 Signed-off-by: Simon Lejeune (sle) <sle@openerp.com>
Diffstat (limited to 'addons/stock/tests')
-rw-r--r--addons/stock/tests/test_robustness.py14
1 files changed, 9 insertions, 5 deletions
diff --git a/addons/stock/tests/test_robustness.py b/addons/stock/tests/test_robustness.py
index 22b3d44975c..b53cb44ea7b 100644
--- a/addons/stock/tests/test_robustness.py
+++ b/addons/stock/tests/test_robustness.py
@@ -71,19 +71,23 @@ class TestRobustness(SavepointCase):
consistent with the `reserved_quantity` on the quants.
"""
# change stock usage
- self.stock_location.scrap_location = True
+ test_stock_location = self.env['stock.location'].create({
+ 'name': "Test Location",
+ 'location_id': self.stock_location.id,
+ })
+ test_stock_location.scrap_location = True
# make some stock
self.env['stock.quant']._update_available_quantity(
self.product1,
- self.stock_location,
+ test_stock_location,
1,
)
# reserve a unit
move1 = self.env['stock.move'].create({
'name': 'test_location_archive',
- 'location_id': self.stock_location.id,
+ 'location_id': test_stock_location.id,
'location_dest_id': self.customer_location.id,
'product_id': self.product1.id,
'product_uom': self.uom_unit.id,
@@ -94,7 +98,7 @@ class TestRobustness(SavepointCase):
self.assertEqual(move1.state, 'assigned')
quant = self.env['stock.quant']._gather(
self.product1,
- self.stock_location,
+ test_stock_location,
)
# assert the reservation
@@ -104,7 +108,7 @@ class TestRobustness(SavepointCase):
# change the stock usage
with self.assertRaises(UserError):
with self.cr.savepoint():
- self.stock_location.scrap_location = False
+ test_stock_location.scrap_location = False
# unreserve
move1._do_unreserve()