From 70091972b2b6f14188fe2ef41c19f827a1385931 Mon Sep 17 00:00:00 2001 From: William Henrotin Date: Wed, 10 Oct 2018 08:27:28 +0000 Subject: [PATCH] [FIX] stock: correct wizard test Accessing one2many items by their index seems to produce issue regarding the order. This commit fix the potential issue in the test by summing the two quant quantity instead of comparing them one by one. closes odoo/odoo#27627 --- addons/stock/tests/test_packing.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/addons/stock/tests/test_packing.py b/addons/stock/tests/test_packing.py index c67d001247b..9c711acd3e7 100644 --- a/addons/stock/tests/test_packing.py +++ b/addons/stock/tests/test_packing.py @@ -251,5 +251,4 @@ class TestPacking(TransactionCase): self.assertEqual(pack1.location_id.id, shelf1_location.id, 'The package must be stored in shelf1') qp1 = pack2.quant_ids[0] qp2 = pack2.quant_ids[1] - self.assertEqual(qp1.quantity, 5, 'The quant has not the good quantity') - self.assertEqual(qp2.quantity, 7, 'The quant has not the good quantity') + self.assertEqual(qp1.quantity + qp2.quantity, 12, 'The quant has not the good quantity')