mirror of
https://github.com/OCA/stock-logistics-warehouse.git
synced 2025-01-21 14:27:28 +02:00
[BACKPORT] stock_available_immediately_exclude_location: Backport to 14.0
This commit is contained in:
@@ -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",
|
||||
|
||||
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user