[BACKPORT] stock_available_immediately_exclude_location: Backport to 14.0

This commit is contained in:
Sébastien Alix
2024-08-30 11:37:24 +02:00
parent c48e3bbb29
commit 7e06ca0882
2 changed files with 4 additions and 4 deletions

View File

@@ -3,7 +3,7 @@
{
"name": "Exclude locations from immediately usable quantity",
"version": "16.0.1.0.0",
"version": "14.0.1.0.0",
"website": "https://github.com/OCA/stock-logistics-warehouse",
"author": "ACSONE SA/NV,Odoo Community Association (OCA)",
"license": "AGPL-3",

View File

@@ -1,10 +1,10 @@
# Copyright 2023 ACSONE SA/NV
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
from odoo.tests.common import TransactionCase
from odoo.tests.common import SavepointCase
class TestStockLogisticsWarehouse(TransactionCase):
class TestStockLogisticsWarehouse(SavepointCase):
@classmethod
def setUpClass(cls) -> None:
super().setUpClass()
@@ -56,6 +56,6 @@ class TestStockLogisticsWarehouse(TransactionCase):
q = self.product.with_context(**ctx_loc).immediately_usable_qty
self.assertEqual(q, 11.0)
self.pack_location.exclude_from_immediately_usable_qty = True
self.product.invalidate_recordset() # force recompute
self.product.invalidate_cache() # force recompute
q = self.product.with_context(**ctx_loc).immediately_usable_qty
self.assertEqual(q, 7.0)