odoo-addon-stock-release-channel 16.0.2.0.1.2__py3-none-any.whl → 16.0.2.1.0__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- odoo/addons/stock_release_channel/__manifest__.py +1 -1
- odoo/addons/stock_release_channel/models/stock_picking.py +5 -1
- odoo/addons/stock_release_channel/models/stock_release_channel.py +7 -6
- odoo/addons/stock_release_channel/tests/__init__.py +8 -5
- odoo/addons/stock_release_channel/tests/test_assign_job.py +66 -0
- {odoo_addon_stock_release_channel-16.0.2.0.1.2.dist-info → odoo_addon_stock_release_channel-16.0.2.1.0.dist-info}/METADATA +1 -1
- {odoo_addon_stock_release_channel-16.0.2.0.1.2.dist-info → odoo_addon_stock_release_channel-16.0.2.1.0.dist-info}/RECORD +9 -8
- {odoo_addon_stock_release_channel-16.0.2.0.1.2.dist-info → odoo_addon_stock_release_channel-16.0.2.1.0.dist-info}/WHEEL +0 -0
- {odoo_addon_stock_release_channel-16.0.2.0.1.2.dist-info → odoo_addon_stock_release_channel-16.0.2.1.0.dist-info}/top_level.txt +0 -0
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
{
|
|
5
5
|
"name": "Stock Release Channels",
|
|
6
6
|
"summary": "Manage workload in WMS with release channels",
|
|
7
|
-
"version": "16.0.2.0
|
|
7
|
+
"version": "16.0.2.1.0",
|
|
8
8
|
"development_status": "Beta",
|
|
9
9
|
"license": "AGPL-3",
|
|
10
10
|
"author": "Camptocamp, ACSONE SA/NV,Odoo Community Association (OCA)",
|
|
@@ -21,8 +21,12 @@ class StockPicking(models.Model):
|
|
|
21
21
|
).assign_release_channel()
|
|
22
22
|
|
|
23
23
|
def assign_release_channel(self):
|
|
24
|
+
messages = ""
|
|
24
25
|
for pick in self:
|
|
25
|
-
self.env["stock.release.channel"].assign_release_channel(pick)
|
|
26
|
+
result = self.env["stock.release.channel"].assign_release_channel(pick)
|
|
27
|
+
if result:
|
|
28
|
+
messages += result + "\n"
|
|
29
|
+
return messages
|
|
26
30
|
|
|
27
31
|
def release_available_to_promise(self):
|
|
28
32
|
for record in self:
|
|
@@ -471,6 +471,7 @@ class StockReleaseChannel(models.Model):
|
|
|
471
471
|
"done",
|
|
472
472
|
):
|
|
473
473
|
return
|
|
474
|
+
message = ""
|
|
474
475
|
for channel in picking._find_release_channel_possible_candidate():
|
|
475
476
|
current = picking
|
|
476
477
|
domain = channel._prepare_domain()
|
|
@@ -491,13 +492,13 @@ class StockReleaseChannel(models.Model):
|
|
|
491
492
|
break
|
|
492
493
|
|
|
493
494
|
if not picking.release_channel_id:
|
|
494
|
-
|
|
495
|
-
|
|
496
|
-
"
|
|
497
|
-
" you should add a final catch-all rule",
|
|
498
|
-
picking.name,
|
|
495
|
+
message = (
|
|
496
|
+
f"Transfer {picking.name} could not be assigned to a "
|
|
497
|
+
"channel, you should add a final catch-all rule"
|
|
499
498
|
)
|
|
500
|
-
|
|
499
|
+
# by this point, the picking should have been assigned
|
|
500
|
+
_logger.warning(message)
|
|
501
|
+
return message
|
|
501
502
|
|
|
502
503
|
def _assign_release_channel_additional_filter(self, pickings):
|
|
503
504
|
self.ensure_one()
|
|
@@ -1,5 +1,8 @@
|
|
|
1
|
-
from . import
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
1
|
+
from . import (
|
|
2
|
+
test_assign_job,
|
|
3
|
+
test_channel_action,
|
|
4
|
+
test_channel_computed_fields,
|
|
5
|
+
test_channel_release_batch,
|
|
6
|
+
test_release_channel,
|
|
7
|
+
test_release_channel_lifecycle,
|
|
8
|
+
)
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
# Copyright 2022 ACSONE SA/NV (http://www.acsone.eu)
|
|
2
|
+
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html)
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
from odoo.addons.queue_job.tests.common import trap_jobs
|
|
6
|
+
|
|
7
|
+
from .common import ReleaseChannelCase
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
class TestReleaseChannel(ReleaseChannelCase):
|
|
11
|
+
def _test_assign_channels(self, expected, message=""):
|
|
12
|
+
move = self._create_single_move(self.product1, 10)
|
|
13
|
+
move.picking_id.priority = "1"
|
|
14
|
+
move2 = self._create_single_move(self.product2, 10)
|
|
15
|
+
with trap_jobs() as trap:
|
|
16
|
+
(move + move2).picking_id._delay_assign_release_channel()
|
|
17
|
+
trap.assert_jobs_count(
|
|
18
|
+
2, only=self.env["stock.picking"].assign_release_channel
|
|
19
|
+
)
|
|
20
|
+
trap.perform_enqueued_jobs()
|
|
21
|
+
self.assertEqual(f"{message}", trap.enqueued_jobs[0].result)
|
|
22
|
+
self.assertEqual(move.picking_id.release_channel_id, expected)
|
|
23
|
+
self.assertEqual(move2.picking_id.release_channel_id, self.default_channel)
|
|
24
|
+
|
|
25
|
+
def test_assign_channel_domain(self):
|
|
26
|
+
channel = self._create_channel(
|
|
27
|
+
name="Test Domain",
|
|
28
|
+
sequence=1,
|
|
29
|
+
rule_domain=[("priority", "=", "1")],
|
|
30
|
+
)
|
|
31
|
+
self._test_assign_channels(channel)
|
|
32
|
+
|
|
33
|
+
def test_assign_channel_none_domain(self):
|
|
34
|
+
self.default_channel.action_sleep()
|
|
35
|
+
self.default_channel = self.env["stock.release.channel"].browse()
|
|
36
|
+
self._create_channel(
|
|
37
|
+
name="Test Domain",
|
|
38
|
+
sequence=1,
|
|
39
|
+
rule_domain=[("priority", "=", "1")],
|
|
40
|
+
)
|
|
41
|
+
move = self._create_single_move(self.product1, 10)
|
|
42
|
+
with trap_jobs() as trap:
|
|
43
|
+
picking = move.picking_id
|
|
44
|
+
message = (
|
|
45
|
+
f"Transfer {picking.name} could not be assigned to a "
|
|
46
|
+
"channel, you should add a final catch-all rule\n"
|
|
47
|
+
)
|
|
48
|
+
move.picking_id._delay_assign_release_channel()
|
|
49
|
+
trap.assert_jobs_count(
|
|
50
|
+
1, only=self.env["stock.picking"].assign_release_channel
|
|
51
|
+
)
|
|
52
|
+
trap.perform_enqueued_jobs()
|
|
53
|
+
self.assertEqual(message, trap.enqueued_jobs[0].result)
|
|
54
|
+
move = self._create_single_move(self.product2, 10)
|
|
55
|
+
with trap_jobs() as trap:
|
|
56
|
+
picking = move.picking_id
|
|
57
|
+
message = (
|
|
58
|
+
f"Transfer {picking.name} could not be assigned to a "
|
|
59
|
+
"channel, you should add a final catch-all rule\n"
|
|
60
|
+
)
|
|
61
|
+
move.picking_id._delay_assign_release_channel()
|
|
62
|
+
trap.assert_jobs_count(
|
|
63
|
+
1, only=self.env["stock.picking"].assign_release_channel
|
|
64
|
+
)
|
|
65
|
+
trap.perform_enqueued_jobs()
|
|
66
|
+
self.assertEqual(message, trap.enqueued_jobs[0].result)
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: odoo-addon-stock-release-channel
|
|
3
|
-
Version: 16.0.2.
|
|
3
|
+
Version: 16.0.2.1.0
|
|
4
4
|
Summary: Manage workload in WMS with release channels
|
|
5
5
|
Home-page: https://github.com/OCA/wms
|
|
6
6
|
Author: Camptocamp, ACSONE SA/NV,Odoo Community Association (OCA)
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
odoo/addons/stock_release_channel/README.rst,sha256=a2y-YAJlAFTVTkZs3HYoLMs-7dj7I1c_Bhq0WH8myiE,5819
|
|
2
2
|
odoo/addons/stock_release_channel/__init__.py,sha256=X9EJGOE2GtZbS0G82PtSXmWSZ_R8jEM0rlJTDliQjp4,21
|
|
3
|
-
odoo/addons/stock_release_channel/__manifest__.py,sha256=
|
|
3
|
+
odoo/addons/stock_release_channel/__manifest__.py,sha256=ZELjHvNogDOPvMKpT4HeRInK_IxCrpikjRYwnV8CjGI,1099
|
|
4
4
|
odoo/addons/stock_release_channel/data/ir_cron_data.xml,sha256=Fs0se4lPKelUpNvJnfEde32718SRlKCt0hEqQWQ-tQg,639
|
|
5
5
|
odoo/addons/stock_release_channel/data/queue_job_data.xml,sha256=MyCGOSZNti3sgtwtco1_EBCM246w2JG8F478tczgbtA,592
|
|
6
6
|
odoo/addons/stock_release_channel/data/stock_release_channel_data.xml,sha256=NRy2ijgGrgLx0FL7spJC1BiaECEDBlMuarFii52jaPE,293
|
|
@@ -9,8 +9,8 @@ odoo/addons/stock_release_channel/i18n/stock_release_channel.pot,sha256=S5F-h1lP
|
|
|
9
9
|
odoo/addons/stock_release_channel/migrations/16.0.1.0.1/pre-migrate.py,sha256=lEss8ujyoQWzjjKzMCOmV79BNEVNPshmY-Xanl7H9CQ,375
|
|
10
10
|
odoo/addons/stock_release_channel/models/__init__.py,sha256=-Fc4Nz0A7KRRsEV7lKMJ8qGOS7a3U6fyl_A_2V9FGWM,89
|
|
11
11
|
odoo/addons/stock_release_channel/models/stock_move.py,sha256=g2G_8R73ziAu9ClX5ogllZB5qCfums45fDH-13F3mrg,839
|
|
12
|
-
odoo/addons/stock_release_channel/models/stock_picking.py,sha256=
|
|
13
|
-
odoo/addons/stock_release_channel/models/stock_release_channel.py,sha256=
|
|
12
|
+
odoo/addons/stock_release_channel/models/stock_picking.py,sha256=BlzuGXZOSIfiRcZ9xtGsIvDOSAHaRu7wUUv9-aLJ2wE,3328
|
|
13
|
+
odoo/addons/stock_release_channel/models/stock_release_channel.py,sha256=hsr_1sw17x-wb69KNZM0lQ8FthEfG2BITF9kMFvyrDk,29726
|
|
14
14
|
odoo/addons/stock_release_channel/readme/CONFIGURE.rst,sha256=foUMWWFytuVRVkV1V4uA4FvsW2I5izyrcR1CzZ6mQTI,93
|
|
15
15
|
odoo/addons/stock_release_channel/readme/CONTRIBUTORS.rst,sha256=8ROGX1tlE1yiYn-56P088w9g3tdPomWs-fL8AxRwV30,360
|
|
16
16
|
odoo/addons/stock_release_channel/readme/CREDITS.rst,sha256=-JppA6kiiAVqptoc7ytAB6vOqf_0W5uJrZLh70XGE3w,50
|
|
@@ -21,8 +21,9 @@ odoo/addons/stock_release_channel/static/description/icon.png,sha256=6xBPJauaFOF
|
|
|
21
21
|
odoo/addons/stock_release_channel/static/description/index.html,sha256=f2c5mT6MtN9RjMHrdN8EeyDr30gmHQTiixYwsfkdJ8M,16476
|
|
22
22
|
odoo/addons/stock_release_channel/static/src/js/progressbar_fractional_widget.js,sha256=sZBSmKdZSR1GFeu04iOH72h7FX5CqujgfTRmFYhh5z0,3184
|
|
23
23
|
odoo/addons/stock_release_channel/static/src/scss/stock_release_channel.scss,sha256=DK0Azc8Gk3FlxeKzjZpLhRZzCQmgXdfLNmfz1CbNN0g,975
|
|
24
|
-
odoo/addons/stock_release_channel/tests/__init__.py,sha256=
|
|
24
|
+
odoo/addons/stock_release_channel/tests/__init__.py,sha256=YLQMKuchmU0tYbNB4P9eL6-gFiuLTofe5oGqZubavbY,192
|
|
25
25
|
odoo/addons/stock_release_channel/tests/common.py,sha256=9gvQB4V_forGF7rR5QD2DR2pLHh0aXZIXArJTPuj35o,6563
|
|
26
|
+
odoo/addons/stock_release_channel/tests/test_assign_job.py,sha256=0G-CDwp6nBYyJv2G62QQS5aVBKtV3IHpp6Tx_Z8fabA,2735
|
|
26
27
|
odoo/addons/stock_release_channel/tests/test_channel_action.py,sha256=jt6IPBPFDiVcvx6kXcSjEoUzRntFmbD5-BK6VVWGP0E,5583
|
|
27
28
|
odoo/addons/stock_release_channel/tests/test_channel_computed_fields.py,sha256=nf9_KYdx-Kvcy_BP9q7vJP2DPwrBiRN-hOXsZ1qXqbA,3231
|
|
28
29
|
odoo/addons/stock_release_channel/tests/test_channel_release_batch.py,sha256=OHp2VBPyjZV10r5IcnEENYB9qalJofbvlKUYWrXRZ_Q,2280
|
|
@@ -30,7 +31,7 @@ odoo/addons/stock_release_channel/tests/test_release_channel.py,sha256=ZMFqP9KI3
|
|
|
30
31
|
odoo/addons/stock_release_channel/tests/test_release_channel_lifecycle.py,sha256=RuPG8resHWW0jyyQIbt4s9P_ByMBBV_2-ZZMkLS1JAQ,3263
|
|
31
32
|
odoo/addons/stock_release_channel/views/stock_picking_views.xml,sha256=aCcMvV8zqDJOMEZJl_EbfOTEOXaKJML4X6mZZxazDIY,2290
|
|
32
33
|
odoo/addons/stock_release_channel/views/stock_release_channel_views.xml,sha256=OalLGdWjVL0F5YsAvGhaVy5tgVr12Wx075Zeu_hxo2c,38737
|
|
33
|
-
odoo_addon_stock_release_channel-16.0.2.
|
|
34
|
-
odoo_addon_stock_release_channel-16.0.2.
|
|
35
|
-
odoo_addon_stock_release_channel-16.0.2.
|
|
36
|
-
odoo_addon_stock_release_channel-16.0.2.
|
|
34
|
+
odoo_addon_stock_release_channel-16.0.2.1.0.dist-info/METADATA,sha256=8Z8sTWJ-qIYZNxxrw1CNLcyH80CDuAk4gfzyL_qbbkQ,6568
|
|
35
|
+
odoo_addon_stock_release_channel-16.0.2.1.0.dist-info/WHEEL,sha256=2wepM1nk4DS4eFpYrW1TTqPcoGNfHhhO_i5m4cOimbo,92
|
|
36
|
+
odoo_addon_stock_release_channel-16.0.2.1.0.dist-info/top_level.txt,sha256=qBj40grFkGOfDZ2WDSw3y1RnDlgG0u8rP8pvGNdbz4w,5
|
|
37
|
+
odoo_addon_stock_release_channel-16.0.2.1.0.dist-info/RECORD,,
|
|
File without changes
|