Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[16.0][REF] stock_release_channel_shipment_advice_deliver: Update test #7

Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
# Copyright 2023 ACSONE SA/NV
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).

from odoo import fields
from odoo.exceptions import UserError
from odoo.tools import mute_logger

Expand Down Expand Up @@ -194,3 +195,20 @@ def test_deliver_partial_pick_without_bo(self):
)
wizard.with_context(test_queue_job_no_delay=True).action_deliver()
self.assertEqual(self.channel.state, "delivered")

def test_delivering_from_shipment_advice(self):
self.assertEqual(self.channel.state, "locked")
self.pickings.write({"release_channel_id": self.channel.id})
self._do_internal_pickings()
self.assertTrue(self.channel.is_action_deliver_allowed)
shipment_advice = self.env["shipment.advice"].create(
{
"shipment_type": "outgoing",
"release_channel_id": self.channel.id,
"dock_id": self.channel.dock_id.id,
"arrival_date": fields.Datetime.now(),
}
)
shipment_advice.action_confirm()
shipment_advice.action_in_progress()
self.assertEqual(self.channel.state, "delivering")
Loading