Skip to content

Commit

Permalink
[FIX] shopfloor: fix sort move line
Browse files Browse the repository at this point in the history
in case of reception, move line can be added without a move, the sort should
consider this case and take move line create date instead of move_id date
  • Loading branch information
sbejaoui committed Nov 26, 2024
1 parent 9cb0835 commit 3625e6b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions shopfloor/actions/move_line_search.py
Original file line number Diff line number Diff line change
Expand Up @@ -161,15 +161,15 @@ def _sort_key_move_lines_priority(self, line):
# make prority negative to keep sorting ascending
return self._sort_key_assigned_to_current_user(line) + (
-int(line.move_id.priority or "0"),
line.move_id.date,
line.move_id.date if line.move_id else line.create_date,
line.move_id.id,
)

def _sort_key_move_lines_location(self, line):
return self._sort_key_assigned_to_current_user(line) + (
line.location_id.shopfloor_picking_sequence or "",
line.location_id.name,
line.move_id.date,
line.move_id.date if line.move_id else line.create_date,
line.move_id.id,
)

Expand Down

0 comments on commit 3625e6b

Please sign in to comment.