diff --git a/shopfloor_reception/services/reception.py b/shopfloor_reception/services/reception.py index 0800eb65142..0b442dad702 100644 --- a/shopfloor_reception/services/reception.py +++ b/shopfloor_reception/services/reception.py @@ -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) 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()