Skip to content

Commit

Permalink
Merge PR #953 into 16.0
Browse files Browse the repository at this point in the history
Signed-off-by jbaudoux
  • Loading branch information
OCA-git-bot committed Dec 31, 2024
2 parents 839c39e + 3625e6b commit 671d331
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 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
6 changes: 3 additions & 3 deletions shopfloor/actions/stock.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ class StockAction(Component):
def _create_return_move__get_max_qty(self, origin_move):
"""Returns the max returneable qty."""
# The max returnable qty is the sent qty minus the already returned qties
quantity = origin_move.reserved_qty
quantity = origin_move.product_uom_qty
for move in origin_move.move_dest_ids:
if (
move.origin_returned_move_id
Expand All @@ -28,7 +28,7 @@ def _create_return_move__get_max_qty(self, origin_move):
if move.state in ("partially_available", "assigned"):
quantity -= sum(move.move_line_ids.mapped("reserved_qty"))
elif move.state in ("done"):
quantity -= move.reserved_qty
quantity -= move.product_uom_qty
return float_round(
quantity, precision_rounding=origin_move.product_id.uom_id.rounding
)
Expand Down Expand Up @@ -92,7 +92,7 @@ def create_return_move(self, return_picking, origin_moves):
def _create_return_picking__get_vals(self, return_types, origin):
return_type = fields.first(return_types)
return {
"move_lines": [],
"move_ids": [],
"picking_type_id": return_type.id,
"state": "draft",
"origin": origin,
Expand Down

0 comments on commit 671d331

Please sign in to comment.