From fa25950ecfba25221ab5d03e923003a55ed9754e Mon Sep 17 00:00:00 2001 From: Juan Ignacio Carreras Date: Wed, 10 Jul 2024 11:31:26 -0300 Subject: [PATCH] [MIG] stock_restrict_lot: Migration to 17.0 --- stock_restrict_lot/__manifest__.py | 2 +- stock_restrict_lot/models/stock_move.py | 4 ++-- stock_restrict_lot/tests/test_restrict_lot.py | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/stock_restrict_lot/__manifest__.py b/stock_restrict_lot/__manifest__.py index 3548f5ffd323..079c8b9aad07 100644 --- a/stock_restrict_lot/__manifest__.py +++ b/stock_restrict_lot/__manifest__.py @@ -1,7 +1,7 @@ { "name": "Stock Restrict Lot", "summary": "Base module that add back the concept of restrict lot on stock move", - "version": "16.0.1.1.0", + "version": "17.0.1.0.0", "category": "Warehouse Management", "website": "https://github.com/OCA/stock-logistics-workflow", "author": "Akretion, Odoo Community Association (OCA)", diff --git a/stock_restrict_lot/models/stock_move.py b/stock_restrict_lot/models/stock_move.py index 1e1bd9ac6f10..df909c1e0bee 100644 --- a/stock_restrict_lot/models/stock_move.py +++ b/stock_restrict_lot/models/stock_move.py @@ -63,8 +63,8 @@ def _get_available_quantity( def _update_reserved_quantity( self, need, - available_quantity, location_id, + quant_ids=None, lot_id=None, package_id=None, owner_id=None, @@ -75,8 +75,8 @@ def _update_reserved_quantity( lot_id = self.restrict_lot_id return super()._update_reserved_quantity( need, - available_quantity, location_id, + quant_ids=quant_ids, lot_id=lot_id, package_id=package_id, owner_id=owner_id, diff --git a/stock_restrict_lot/tests/test_restrict_lot.py b/stock_restrict_lot/tests/test_restrict_lot.py index e8c3bac3f6a6..d1a66ea4095b 100644 --- a/stock_restrict_lot/tests/test_restrict_lot.py +++ b/stock_restrict_lot/tests/test_restrict_lot.py @@ -191,7 +191,7 @@ def assert_move_line_per_lot_and_location( and mov.location_id == expect_from_location ) self.assertEqual(len(concern_move_line), 1) - self.assertEqual(concern_move_line.reserved_uom_qty, expect_reserved_qty) + self.assertEqual(concern_move_line.quantity_product_uom, expect_reserved_qty) pickings = self.env["stock.picking"].search( [("group_id", "=", procurement_group.id)]