diff --git a/shopfloor_full_location_reservation/services/location_content_transfer.py b/shopfloor_full_location_reservation/services/location_content_transfer.py index a646d922557..2a2139d9b14 100644 --- a/shopfloor_full_location_reservation/services/location_content_transfer.py +++ b/shopfloor_full_location_reservation/services/location_content_transfer.py @@ -7,17 +7,19 @@ class LocationContentTransfer(Component): _inherit = "shopfloor.location.content.transfer" - def _find_location_move_lines_from_scan_location(self, *args, **kwargs): - move_lines = super()._find_location_move_lines_from_scan_location( - *args, **kwargs - ) + def _select_move_lines_first_location(self, move_lines): if not self.work.menu.full_location_reservation: - return move_lines + return super()._select_move_lines_first_location(move_lines) if any(move_lines.move_id.mapped("is_full_location_reservation")): - return move_lines + return super()._select_move_lines_first_location(move_lines) - move_lines |= move_lines._full_location_reservation().move_line_ids + move_lines = super()._select_move_lines_first_location(move_lines) + move_lines |= move_lines._full_location_reservation(strict=True).move_line_ids + + # As lines should concern only one source location and as lines + # can have been split, we need to retrieve only those with first location + move_lines = super()._select_move_lines_first_location(move_lines.exists()) return move_lines.exists() def _move_lines_cancel_work(self, move_lines): diff --git a/test-requirements.txt b/test-requirements.txt index 7fe4bbe4f3a..df20c4fc21d 100644 --- a/test-requirements.txt +++ b/test-requirements.txt @@ -1,5 +1,4 @@ vcrpy-unittest odoo_test_helper odoo-addon-stock-full-location-reservation @ git+https://github.com/OCA/wms.git@refs/pull/794/head#subdirectory=setup/stock_full_location_reservation -odoo-addon-shopfloor-base @ git+https://github.com/OCA/wms.git@refs/pull/899/head#subdirectory=setup/shopfloor_base -odoo-addon-shopfloor @ git+https://github.com/OCA/wms.git@refs/pull/899/head#subdirectory=setup/shopfloor +odoo-addon-shopfloor @ git+https://github.com/OCA/wms.git@refs/pull/917/head#subdirectory=setup/shopfloor