mirror of
https://github.com/OCA/manufacture.git
synced 2025-01-28 16:37:15 +02:00
[FIX] mrp_multi_level: starting qty on hand wrong when using lots
Unify the way to get the starting on hand whenever needed in MRP calculations.
This commit is contained in:
@@ -524,3 +524,12 @@ class TestMrpMultiLevel(TestMrpMultiLevelCommon):
|
||||
f"unexpected value for {key}: {inv[key]} "
|
||||
f"(expected {test_vals[key]} on {inv.date}",
|
||||
)
|
||||
|
||||
def test_19_on_hand_with_lots(self):
|
||||
"""Check that on-hand is correctly computed when tracking by lots."""
|
||||
lots_line_1 = self.mrp_inventory_obj.search(
|
||||
[("product_mrp_area_id.product_id", "=", self.product_lots.id)]
|
||||
)
|
||||
self.assertEqual(len(lots_line_1), 1)
|
||||
self.assertEqual(lots_line_1.initial_on_hand_qty, 210)
|
||||
self.assertEqual(lots_line_1.final_on_hand_qty, 185)
|
||||
|
||||
Reference in New Issue
Block a user