summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristophe Simonis <chs@odoo.com>2018-05-14 11:14:20 +0200
committerChristophe Simonis <chs@odoo.com>2018-05-14 11:14:20 +0200
commitaa7088bf0efb0609ee03a2ed36e4f356ecd29fd1 (patch)
tree6f44d7f0d4cee604f399224f1d1ec99e521ed9b3
parent79cfc85b9185e7b2fe6fc4620fede239d03b934d (diff)
[FIX] stock: correct tests
-rw-r--r--addons/stock/tests/test_move.py1
-rw-r--r--addons/stock/tests/test_move2.py9
2 files changed, 6 insertions, 4 deletions
diff --git a/addons/stock/tests/test_move.py b/addons/stock/tests/test_move.py
index e3720acd44e..f1879f97d06 100644
--- a/addons/stock/tests/test_move.py
+++ b/addons/stock/tests/test_move.py
@@ -1825,6 +1825,7 @@ class StockMove(TransactionCase):
'category_id': self.uom_unit.category_id.id,
'factor_inv': 3,
'rounding': 1,
+ 'uom_type': 'bigger',
})
for i in range(1, 4):
lot_id = self.env['stock.production.lot'].create({
diff --git a/addons/stock/tests/test_move2.py b/addons/stock/tests/test_move2.py
index 53081b78761..1f9cb8bcfdb 100644
--- a/addons/stock/tests/test_move2.py
+++ b/addons/stock/tests/test_move2.py
@@ -1071,18 +1071,19 @@ class TestSinglePicking(TestStockCommon):
'partner_id': self.partner_delta_id,
'picking_type_id': self.picking_type_out,
})
+ product = self.kgB
self.MoveObj.create({
- 'name': self.productA.name,
- 'product_id': self.productA.id,
+ 'name': product.name,
+ 'product_id': product.id,
'product_uom_qty': 5.5,
'quantity_done': 5.95,
- 'product_uom': self.productA.uom_id.id,
+ 'product_uom': product.uom_id.id,
'picking_id': delivery.id,
'location_id': self.stock_location,
'location_dest_id': self.customer_location,
})
stock_location = self.env['stock.location'].browse(self.stock_location)
- self.env['stock.quant']._update_available_quantity(self.productA, stock_location, 5.5)
+ self.env['stock.quant']._update_available_quantity(product, stock_location, 5.5)
delivery.action_confirm()
delivery.action_assign()
delivery.action_done()