Skip to content

Commit 28b57f0

Browse files
committed
[FIX] shopfloor: Fix tests
1 parent ff07228 commit 28b57f0

2 files changed

Lines changed: 10 additions & 11 deletions

File tree

shopfloor/actions/message.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -665,7 +665,10 @@ def location_content_unable_to_transfer(self, move, location, location_dest):
665665
location_dest=location_dest.name,
666666
product_name=move.product_id.display_name,
667667
)
668-
return {"message_type": "error", "body": message}
668+
return {
669+
"message_type": "error",
670+
"body": message,
671+
}
669672

670673
def product_in_multiple_sublocation(self, product):
671674
return {

shopfloor/tests/test_location_content_transfer_putaway.py

Lines changed: 6 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -134,18 +134,14 @@ def test_putaway_move_dest_not_child_of_picking_type_dest(self):
134134
)
135135
self.assertEqual(existing_moves, current_moves)
136136

137-
test_move = self.env["stock.move"].new(
138-
{
139-
"product_id": self.product_a.id,
140-
"location_dest_id": self.picking_type.default_location_dest_id.id,
141-
"location_id": self.test_loc.id,
142-
}
143-
)
137+
message = {
138+
"message_type": "error",
139+
"body": "The content of test cannot be transferred to test with "
140+
"this scenario for product [A] Product A.",
141+
}
144142
self.assert_response(
145143
response,
146144
next_state="scan_location",
147145
data=self.ANY,
148-
message=self.service.msg_store.location_content_unable_to_transfer(
149-
test_move, self.test_loc, self.test_loc
150-
),
146+
message=message,
151147
)

0 commit comments

Comments
 (0)