Skip to content

Commit

Permalink
fixup! [ADD] stock_release_channel_auto_release: Add automatic releas…
Browse files Browse the repository at this point in the history
…e mode
  • Loading branch information
TDu committed May 22, 2024
1 parent b27081d commit 184f64a
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion stock_release_channel/models/stock_release_channel.py
Original file line number Diff line number Diff line change
Expand Up @@ -733,7 +733,7 @@ def _get_next_pickings(self):

def _get_pickings_to_release(self):
"""Get the pickings to release."""
domain = self._field_picking_domains()["count_picking_release_ready"]
domain = self._field_picking_domains()["release_ready"]
domain += [("release_channel_id", "in", self.ids)]
return self.env["stock.picking"].search(domain)

Expand Down
2 changes: 1 addition & 1 deletion stock_release_channel/tests/test_channel_release_batch.py
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ def test_release_auto_group_commercial_partner(self):
self.assertTrue(all(p.need_release) for p in other_pickings)

def test_release_auto_group_commercial_partner_no_next_batch(self):
self.channel.auto_release = "group_commercial_partner"
self.channel.batch_mode = "group_commercial_partner"
pickings = self.channel.picking_ids.filtered(lambda p: p.release_ready)
for _i in range(0, len(pickings.partner_id.commercial_partner_id)):
action = self.channel.release_next_batch()
Expand Down

0 comments on commit 184f64a

Please sign in to comment.