Skip to content

Commit

Permalink
[FIX] - plan only ready moves
Browse files Browse the repository at this point in the history
  • Loading branch information
sbejaoui committed Jul 5, 2023
1 parent 0239264 commit ae2bfc0
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion shipment_advice_planner/wizards/shipment_advice_planner.py
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,11 @@ def _get_picking_to_plan_by_picking_type(self):
def _prepare_shipment_advice_simple_vals_list(self, picking_type, pickings_to_plan):
self.ensure_one()
vals = self._prepare_shipment_advice_common_vals(picking_type)
vals["planned_move_ids"] = [Command.set(pickings_to_plan.move_ids.ids)]
moves_to_plan = pickings_to_plan.move_ids.filtered(
lambda m: m.state in ("assigned", "partially_available")
)
if moves_to_plan:
vals["planned_move_ids"] = [Command.set(moves_to_plan.ids)]
return [vals]

def _prepare_shipment_advice_common_vals(self, picking_type):
Expand Down

0 comments on commit ae2bfc0

Please sign in to comment.