Skip to content

Commit

Permalink
Merge branch '14.0-fix-stock_picking_restrict_cancel_with_orig_move-m…
Browse files Browse the repository at this point in the history
…rp' of git+ssh://github.com/efatto/stock-logistics-workflow into 14.0
  • Loading branch information
Pretecno committed Jan 8, 2025
2 parents 262eb7f + 029d339 commit 5ececb9
Showing 1 changed file with 9 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -29,11 +29,16 @@ def _action_cancel(self):
blocking_moves = self.get_blocking_moves(orig_moves)
blocking_objects = self.identify_blocking_objects(blocking_moves)
error_objects = ""
for object_type, objects in blocking_objects.items():
error_objects += _(
"- {} : {}. \n".format(
object_type, ",".join([o.name for o in objects])
if blocking_objects:
for object_type, objects in blocking_objects.items():
error_objects += _(
"- {} : {}. \n".format(
object_type, ",".join([o.name for o in objects])
)
)
else:
error_objects += _(
"- {}. \n".format(",".join(blocking_moves.mapped("name")))
)
raise UserError(
_(
Expand Down

0 comments on commit 5ececb9

Please sign in to comment.