Skip to content

Commit

Permalink
[FIX] stock_restrict_lot : actually assign and validate move instead …
Browse files Browse the repository at this point in the history
…of changing its state to done in tests
  • Loading branch information
metaminux authored and Kev-Roche committed Oct 9, 2024
1 parent ce09fd7 commit f3cf135
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion stock_restrict_lot/tests/test_restrict_lot.py
Original file line number Diff line number Diff line change
Expand Up @@ -373,7 +373,9 @@ def test_restrict_lot_propagation_origin_and_dest_moves(self):
def test_restrict_lot_no_propagation_error(self):
move, new_lot = self._create_move_with_lot()
orig_move = move.move_orig_ids
orig_move.state = "done"
orig_move._action_assign()
orig_move.quantity_done = orig_move.product_uom_qty
orig_move._action_done()
self.assertEqual(orig_move.state, "done")
with self.assertRaises(ValidationError) as m:
move.restrict_lot_id = new_lot.id
Expand Down

0 comments on commit f3cf135

Please sign in to comment.