diff --git a/addons/stock/models/product.py b/addons/stock/models/product.py index 1e3c36c004b2d..9694ee5ed40db 100644 --- a/addons/stock/models/product.py +++ b/addons/stock/models/product.py @@ -159,7 +159,7 @@ def _get_domain_locations(self): if self.env.context.get('company_owned', False): company_id = self.env.user.company_id.id return ( - [('location_id.company_id', '=', company_id)], + [('location_id.company_id', '=', company_id), ('location_id.usage', 'in', ['internal', 'transit'])], [('location_id.company_id', '=', False), ('location_dest_id.company_id', '=', company_id)], [('location_id.company_id', '=', company_id), ('location_dest_id.company_id', '=', False), ]) diff --git a/addons/stock_account/tests/test_stockvaluation.py b/addons/stock_account/tests/test_stockvaluation.py index ce88777d13d08..297217e8de7d1 100644 --- a/addons/stock_account/tests/test_stockvaluation.py +++ b/addons/stock_account/tests/test_stockvaluation.py @@ -3111,7 +3111,7 @@ def test_fifo_sublocation_valuation_1(self): self.assertEqual(move1.remaining_value, 10) self.assertEqual(move1.remaining_qty, 1) self.assertAlmostEqual(self.product1.qty_available, 0.0) - self.assertAlmostEqual(self.product1.qty_at_date, 2.0) + self.assertAlmostEqual(self.product1.qty_at_date, 1.0) self.assertEqual(self.product1.stock_value, 10) self.assertTrue(len(move1.account_move_ids), 1)