Skip to content

Commit

Permalink
[IMP] stock_release_channel: Set default state to asleep
Browse files Browse the repository at this point in the history
  • Loading branch information
tuantrantg committed Mar 28, 2024
1 parent 47be667 commit 9bc1685
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 1 deletion.
1 change: 1 addition & 0 deletions stock_release_channel/demo/stock_release_channel.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
<field name="name">Default</field>
<field name="sequence">999</field>
<field name="rule_domain">[]</field>
<field name="state">open</field>
</record>

</odoo>
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 @@ -182,7 +182,7 @@ class StockReleaseChannel(models.Model):
"still working)\n"
"* Asleep: Assigned pickings not processed are unassigned from the release "
"channel.\n",
default="open",
default="asleep",
)
is_action_lock_allowed = fields.Boolean(
compute="_compute_is_action_lock_allowed",
Expand Down
2 changes: 2 additions & 0 deletions stock_release_channel/tests/common.py
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,8 @@ def _create_single_move(cls, product, qty, group=None):

@classmethod
def _create_channel(cls, **vals):
# Forced update state of channel to "open"
vals.update({"state": "open"})
return cls.env["stock.release.channel"].create(vals)

def _run_customer_procurement(self, date=None):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -153,6 +153,7 @@ def test_picking_scheduled_date(self):
{
"name": "Test Date",
"process_end_time": 15,
"state": "open",
}
)
channel.action_sleep()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ def _create_propagate_channel(cls):
"name": "Propagate Channel",
"sequence": 200,
"rule_domain": [],
"state": "open",
}
)

Expand Down

0 comments on commit 9bc1685

Please sign in to comment.