Skip to content

Commit

Permalink
[FIX] shopfloor_reception: Unmark as picked on partial picking
Browse files Browse the repository at this point in the history
  • Loading branch information
mt-software-de committed Sep 14, 2023
1 parent 43e3161 commit 561e64c
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion shopfloor_reception/services/reception.py
Original file line number Diff line number Diff line change
Expand Up @@ -1247,13 +1247,16 @@ def _auto_post_line(self, selected_line):
# then selected_line is the only one related to this move.
# In such case, we must ensure there's another move line with the remaining
# quantity to do, so selected_line is extracted in a new move as expected.
selected_line._split_partial_quantity()
new_move_line = selected_line._split_partial_quantity()
new_move = selected_line.move_id.split_other_move_lines(
selected_line, intersection=True
)
if new_move:
# A new move is created in case of partial quantity
new_move.extract_and_action_done()
stock = self._actions_for("stock")
stock.unmark_move_line_as_picked(new_move_line)
new_move_line.location_dest_id = new_move_line.move_id.location_dest_id
return
# In case of full quantity, post the initial move
selected_line.move_id.extract_and_action_done()
Expand Down

0 comments on commit 561e64c

Please sign in to comment.