Skip to content

Commit

Permalink
shopfloor_reception: fix lock on move when done
Browse files Browse the repository at this point in the history
  • Loading branch information
TDu committed Nov 15, 2023
1 parent 333b1db commit d839dae
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions shopfloor_reception/services/reception.py
Original file line number Diff line number Diff line change
Expand Up @@ -1291,14 +1291,14 @@ def _auto_post_line(self, selected_line):
if selected_line.qty_done == move_quantity:
# In case of full quantity, post the initial move
return selected_line.move_id.extract_and_action_done()
lock = self._actions_for("lock")
lock.for_update(move)

Check warning on line 1295 in shopfloor_reception/services/reception.py

View check run for this annotation

Codecov / codecov/patch

shopfloor_reception/services/reception.py#L1295

Added line #L1295 was not covered by tests
split_move_vals = move._split(selected_line.qty_done)
new_move = move.create(split_move_vals)
new_move.move_line_ids = selected_line
new_move._action_confirm(merge=False)
new_move._recompute_state()
new_move._action_assign()
lock = self._actions_for("lock")
lock.for_update(move)
move._recompute_state()
new_move.extract_and_action_done()

Expand Down

0 comments on commit d839dae

Please sign in to comment.