Skip to content

Commit

Permalink
shopfloor: checkout fix line done with zero qty
Browse files Browse the repository at this point in the history
Follwing this change

    OCA@b2ce1bd

Multiple lines are displayed in the `select_package` state.
Some could have the quantity done set to zero. In that case the lines
should not be set has checkout done.

When putting lines in a package it is already handled by
`_filter_lines_to_pack`
  • Loading branch information
TDu committed Nov 7, 2023
1 parent bbf3416 commit a529554
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion shopfloor/services/checkout.py
Original file line number Diff line number Diff line change
Expand Up @@ -1199,7 +1199,10 @@ def no_package(self, picking_id, selected_line_ids):
if message:
return self._response_for_select_document(message=message)
selected_lines = self.env["stock.move.line"].browse(selected_line_ids).exists()
selected_lines.write(
selected_lines_with_qty_done = selected_lines.filtered(
lambda line: line.qty_done > 0
)
selected_lines_with_qty_done.write(
{"shopfloor_checkout_done": True, "result_package_id": False}
)
response = self._check_allowed_qty_done(picking, selected_lines)
Expand Down

0 comments on commit a529554

Please sign in to comment.