Skip to content

Commit

Permalink
fixup! fixup! fixup! fixup! fixup! fixup! fixup! fixup! sale_stock_av…
Browse files Browse the repository at this point in the history
…ailable_to_promise_release_block: add Unblock Release wizard
  • Loading branch information
sebalix committed Aug 2, 2024
1 parent 5c42ee0 commit 666a153
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -100,4 +100,7 @@ def action_confirm(self):
self.env["unblock.release"]._reschedule_moves(
order.move_to_unblock_ids, date_deadline, from_order=order
)
# Unblock the release
if not order.block_release:
order.move_to_unblock_ids.action_unblock_release()
return super().action_confirm()
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,9 @@ def test_unblock_release_contextual(self):
for m in (existing_moves | new_moves)
)
)
self.assertTrue(
all(not m.release_blocked for m in (existing_moves | new_moves))
)

def test_unblock_release_contextual_different_shipping_policy(self):
self._set_stock(self.line.product_id, self.line.product_uom_qty)
Expand Down Expand Up @@ -134,6 +137,9 @@ def test_unblock_release_contextual_different_shipping_policy(self):
for m in (existing_moves | new_moves)
)
)
self.assertTrue(
all(not m.release_blocked for m in (existing_moves | new_moves))
)
self.assertEqual(
existing_moves.group_id.move_type, new_moves.group_id.move_type
)
Expand Down

0 comments on commit 666a153

Please sign in to comment.