odoo-addon-stock-release-channel 16.0.2.15.1__py3-none-any.whl → 16.0.2.16.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.
@@ -7,7 +7,7 @@ Stock Release Channels
7
7
  !! This file is generated by oca-gen-addon-readme !!
8
8
  !! changes will be overwritten. !!
9
9
  !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
10
- !! source digest: sha256:bf6f73ffc27437f50c9f1cce19d655b0be0676e109503c421749f049a89a55bf
10
+ !! source digest: sha256:c7b3a173288cb4c3876f426139d858ac071ded80b2c77f56c4b1dc555ed9e867
11
11
  !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
12
12
 
13
13
  .. |badge1| image:: https://img.shields.io/badge/maturity-Beta-yellow.png
@@ -5,7 +5,7 @@
5
5
  {
6
6
  "name": "Stock Release Channels",
7
7
  "summary": "Manage workload in WMS with release channels",
8
- "version": "16.0.2.15.1",
8
+ "version": "16.0.2.16.0",
9
9
  "development_status": "Beta",
10
10
  "license": "AGPL-3",
11
11
  "author": "Camptocamp, BCIM, ACSONE SA/NV, Odoo Community Association (OCA)",
@@ -2,6 +2,7 @@
2
2
  # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html)
3
3
 
4
4
  from odoo import _, exceptions, fields, models
5
+ from odoo.osv import expression
5
6
 
6
7
  from odoo.addons.queue_job.job import identity_exact
7
8
 
@@ -106,18 +107,43 @@ class StockPicking(models.Model):
106
107
  .sorted(key=lambda r: (not bool(r.partner_ids), r.sequence))
107
108
  )
108
109
 
109
- def _get_release_channel_possible_candidate_domain(self):
110
- self.ensure_one()
110
+ def _get_release_channel_possible_candidate_domain_channel(self):
111
111
  return [
112
112
  ("is_manual_assignment", "=", False),
113
113
  ("state", "!=", "asleep"),
114
+ ]
115
+
116
+ def _get_release_channel_possible_candidate_domain_picking(self):
117
+ return [
114
118
  "|",
115
119
  ("picking_type_ids", "=", False),
116
120
  ("picking_type_ids", "in", self.picking_type_id.ids),
117
121
  "|",
118
122
  ("warehouse_id", "=", False),
119
123
  ("warehouse_id", "=", self.picking_type_id.warehouse_id.id),
124
+ ]
125
+
126
+ def _get_release_channel_possible_candidate_domain_partner(self):
127
+ return [
120
128
  "|",
121
129
  ("partner_ids", "=", False),
122
130
  ("partner_ids", "in", self.partner_id.ids),
123
131
  ]
132
+
133
+ def _inject_possible_candidate_domain_partner(self):
134
+ """Hooks that could be overridden.
135
+
136
+ Return a boolean.
137
+ """
138
+ return True
139
+
140
+ def _get_release_channel_possible_candidate_domain(self):
141
+ self.ensure_one()
142
+ domain_channel = self._get_release_channel_possible_candidate_domain_channel()
143
+ domain_picking = self._get_release_channel_possible_candidate_domain_picking()
144
+ domain = expression.AND([domain_channel, domain_picking])
145
+ if self._inject_possible_candidate_domain_partner():
146
+ domain = expression.AND(
147
+ [domain, self._get_release_channel_possible_candidate_domain_partner()]
148
+ )
149
+ return domain
@@ -848,6 +848,7 @@ class StockReleaseChannel(models.Model):
848
848
  pickings_to_unassign.write({"release_channel_id": False})
849
849
  pickings_to_unassign.unrelease()
850
850
  self.write({"state": "asleep"})
851
+ pickings_to_unassign._delay_assign_release_channel()
851
852
 
852
853
  def action_wake_up(self):
853
854
  self._check_is_action_wake_up_allowed()
@@ -8,10 +8,11 @@
8
8
 
9
9
  /*
10
10
  :Author: David Goodger (goodger@python.org)
11
- :Id: $Id: html4css1.css 8954 2022-01-20 10:10:25Z milde $
11
+ :Id: $Id: html4css1.css 9511 2024-01-13 09:50:07Z milde $
12
12
  :Copyright: This stylesheet has been placed in the public domain.
13
13
 
14
14
  Default cascading style sheet for the HTML output of Docutils.
15
+ Despite the name, some widely supported CSS2 features are used.
15
16
 
16
17
  See https://docutils.sourceforge.io/docs/howto/html-stylesheets.html for how to
17
18
  customize this style sheet.
@@ -274,7 +275,7 @@ pre.literal-block, pre.doctest-block, pre.math, pre.code {
274
275
  margin-left: 2em ;
275
276
  margin-right: 2em }
276
277
 
277
- pre.code .ln { color: grey; } /* line numbers */
278
+ pre.code .ln { color: gray; } /* line numbers */
278
279
  pre.code, code { background-color: #eeeeee }
279
280
  pre.code .comment, code .comment { color: #5C6576 }
280
281
  pre.code .keyword, code .keyword { color: #3B0D06; font-weight: bold }
@@ -300,7 +301,7 @@ span.option {
300
301
  span.pre {
301
302
  white-space: pre }
302
303
 
303
- span.problematic {
304
+ span.problematic, pre.problematic {
304
305
  color: red }
305
306
 
306
307
  span.section-subtitle {
@@ -366,7 +367,7 @@ ul.auto-toc {
366
367
  !! This file is generated by oca-gen-addon-readme !!
367
368
  !! changes will be overwritten. !!
368
369
  !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
369
- !! source digest: sha256:bf6f73ffc27437f50c9f1cce19d655b0be0676e109503c421749f049a89a55bf
370
+ !! source digest: sha256:c7b3a173288cb4c3876f426139d858ac071ded80b2c77f56c4b1dc555ed9e867
370
371
  !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -->
371
372
  <p><a class="reference external image-reference" href="https://odoo-community.org/page/development-status"><img alt="Beta" src="https://img.shields.io/badge/maturity-Beta-yellow.png" /></a> <a class="reference external image-reference" href="http://www.gnu.org/licenses/agpl-3.0-standalone.html"><img alt="License: AGPL-3" src="https://img.shields.io/badge/licence-AGPL--3-blue.png" /></a> <a class="reference external image-reference" href="https://github.com/OCA/wms/tree/16.0/stock_release_channel"><img alt="OCA/wms" src="https://img.shields.io/badge/github-OCA%2Fwms-lightgray.png?logo=github" /></a> <a class="reference external image-reference" href="https://translation.odoo-community.org/projects/wms-16-0/wms-16-0-stock_release_channel"><img alt="Translate me on Weblate" src="https://img.shields.io/badge/weblate-Translate%20me-F47D42.png" /></a> <a class="reference external image-reference" href="https://runboat.odoo-community.org/builds?repo=OCA/wms&amp;target_branch=16.0"><img alt="Try me on Runboat" src="https://img.shields.io/badge/runboat-Try%20me-875A7B.png" /></a></p>
372
373
  <p>Release channels are:</p>
@@ -483,7 +484,9 @@ If you spotted it first, help us to smash it by providing a detailed and welcome
483
484
  <div class="section" id="maintainers">
484
485
  <h2><a class="toc-backref" href="#toc-entry-9">Maintainers</a></h2>
485
486
  <p>This module is maintained by the OCA.</p>
486
- <a class="reference external image-reference" href="https://odoo-community.org"><img alt="Odoo Community Association" src="https://odoo-community.org/logo.png" /></a>
487
+ <a class="reference external image-reference" href="https://odoo-community.org">
488
+ <img alt="Odoo Community Association" src="https://odoo-community.org/logo.png" />
489
+ </a>
487
490
  <p>OCA, or the Odoo Community Association, is a nonprofit organization whose
488
491
  mission is to support the collaborative development of Odoo features and
489
492
  promote its widespread use.</p>
@@ -42,6 +42,18 @@ class TestReleaseChannelLifeCycle(ReleaseChannelCase):
42
42
  move.picking_id.assign_release_channel()
43
43
  self.assertFalse(move.picking_id.release_channel_id)
44
44
 
45
+ def test_release_channel_asleep_assignable_if_suitable_candidate(self):
46
+ move = self._create_single_move(self.product1, 10)
47
+ move.picking_id.assign_release_channel()
48
+ self.assertEqual(move.picking_id.release_channel_id, self.default_channel)
49
+ copy_channel = self.default_channel.copy(
50
+ {"name": "channel copy", "state": "open"}
51
+ )
52
+ with trap_jobs() as trap:
53
+ self.default_channel.action_sleep()
54
+ trap.perform_enqueued_jobs()
55
+ self.assertEqual(move.picking_id.release_channel_id, copy_channel)
56
+
45
57
  def test_release_channel_wake_up_assign(self):
46
58
  self.default_channel.action_sleep()
47
59
  move = self._create_single_move(self.product1, 10)
@@ -1,11 +1,10 @@
1
1
  # Copyright 2020 Camptocamp (https://www.camptocamp.com)
2
2
  # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html)
3
3
 
4
-
5
4
  from .common import ReleaseChannelCase
6
5
 
7
6
 
8
- class TestReleaseChannelPartner(ReleaseChannelCase):
7
+ class ReleaseChannelPartnerCommon(ReleaseChannelCase):
9
8
  @classmethod
10
9
  def setUpClass(cls):
11
10
  super().setUpClass()
@@ -31,6 +30,8 @@ class TestReleaseChannelPartner(ReleaseChannelCase):
31
30
  cls.partner2.stock_release_channel_ids = False
32
31
  cls.moves = cls.move + cls.move2
33
32
 
33
+
34
+ class TestReleaseChannelPartner(ReleaseChannelPartnerCommon):
34
35
  def test_00(self):
35
36
  """partner release channel is higher priority than other channels"""
36
37
  self.moves.picking_id.assign_release_channel()
@@ -1,12 +1,11 @@
1
1
  Metadata-Version: 2.1
2
- Name: odoo-addon-stock-release-channel
3
- Version: 16.0.2.15.1
2
+ Name: odoo-addon-stock_release_channel
3
+ Version: 16.0.2.16.0
4
4
  Summary: Manage workload in WMS with release channels
5
5
  Home-page: https://github.com/OCA/wms
6
6
  Author: Camptocamp, BCIM, ACSONE SA/NV, Odoo Community Association (OCA)
7
7
  Author-email: support@odoo-community.org
8
8
  License: AGPL-3
9
- Platform: UNKNOWN
10
9
  Classifier: Programming Language :: Python
11
10
  Classifier: Framework :: Odoo
12
11
  Classifier: Framework :: Odoo :: 16.0
@@ -26,7 +25,7 @@ Stock Release Channels
26
25
  !! This file is generated by oca-gen-addon-readme !!
27
26
  !! changes will be overwritten. !!
28
27
  !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
29
- !! source digest: sha256:bf6f73ffc27437f50c9f1cce19d655b0be0676e109503c421749f049a89a55bf
28
+ !! source digest: sha256:c7b3a173288cb4c3876f426139d858ac071ded80b2c77f56c4b1dc555ed9e867
30
29
  !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
31
30
 
32
31
  .. |badge1| image:: https://img.shields.io/badge/maturity-Beta-yellow.png
@@ -180,5 +179,3 @@ Current `maintainers <https://odoo-community.org/page/maintainer-role>`__:
180
179
  This module is part of the `OCA/wms <https://github.com/OCA/wms/tree/16.0/stock_release_channel>`_ project on GitHub.
181
180
 
182
181
  You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.
183
-
184
-
@@ -1,6 +1,6 @@
1
- odoo/addons/stock_release_channel/README.rst,sha256=0xTddkL_kAF_IrofnSEW-lIm444-DNN9Pu3HvluyPAw,6403
1
+ odoo/addons/stock_release_channel/README.rst,sha256=VvgCjOBdWmsGWIw6MO9lVj8IFTCATX_OW7E_Q4xryoM,6403
2
2
  odoo/addons/stock_release_channel/__init__.py,sha256=X9EJGOE2GtZbS0G82PtSXmWSZ_R8jEM0rlJTDliQjp4,21
3
- odoo/addons/stock_release_channel/__manifest__.py,sha256=yxIVb6A65tSv3fcrqJeuEKXCOBlKwVKcwnK_i7osoP4,1296
3
+ odoo/addons/stock_release_channel/__manifest__.py,sha256=uD2OVMFIIL8AuUHd3-EbWr7p1WP92kQo6RO9yBKuiSM,1296
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/demo/stock_release_channel.xml,sha256=vV4B7aykN0VNn0xxubIHikwVi0RPMhZDWcYn5BH68ck,334
@@ -14,8 +14,8 @@ odoo/addons/stock_release_channel/models/res_company.py,sha256=Vj27CcrLlr8vsgMel
14
14
  odoo/addons/stock_release_channel/models/res_config_settings.py,sha256=-oh2L7FWf60ACuqY5ojgRvlrqNBr9XXMCd78XVN_w9c,571
15
15
  odoo/addons/stock_release_channel/models/res_partner.py,sha256=DFaj1L1QFnUNhRGrOlyturX3BYjXrplk-Om4skzmPCI,448
16
16
  odoo/addons/stock_release_channel/models/stock_move.py,sha256=iaPhHbzM12YtUjexaCU6MMTQcPPntJ0FJS_BX8NKRHE,1592
17
- odoo/addons/stock_release_channel/models/stock_picking.py,sha256=ByS0jEkNzvh1EaFcIAFmBXQuoVHcwwv-aNlTteYwS3M,4679
18
- odoo/addons/stock_release_channel/models/stock_release_channel.py,sha256=j3-WtWtwiZuaLVy4rpKHbVaX9vT6w5ekEQqgd0Mfdnk,33366
17
+ odoo/addons/stock_release_channel/models/stock_picking.py,sha256=XgKYXVefbtOq73TyLR8CCeg6KRlqlIbUSX7rzI7kyJk,5600
18
+ odoo/addons/stock_release_channel/models/stock_release_channel.py,sha256=tmM-QvZSDK_h_YPuzwXWVcyFqRzePirMDE79ixaz-lo,33427
19
19
  odoo/addons/stock_release_channel/readme/CONFIGURE.rst,sha256=foUMWWFytuVRVkV1V4uA4FvsW2I5izyrcR1CzZ6mQTI,93
20
20
  odoo/addons/stock_release_channel/readme/CONTRIBUTORS.rst,sha256=q95yj-6flBF2N4IB-vbF_p06ClGmIrCySl2bfz9ExPA,414
21
21
  odoo/addons/stock_release_channel/readme/CREDITS.rst,sha256=-JppA6kiiAVqptoc7ytAB6vOqf_0W5uJrZLh70XGE3w,50
@@ -23,7 +23,7 @@ odoo/addons/stock_release_channel/readme/DESCRIPTION.rst,sha256=LJj2UQ3g5NteOFkf
23
23
  odoo/addons/stock_release_channel/readme/USAGE.rst,sha256=uKImsGjEDoJdmYBbgXcDLcBQ8eh4wZzPE8kGfAQvyDA,1588
24
24
  odoo/addons/stock_release_channel/security/stock_release_channel.xml,sha256=U0WfLbMKR4mnNdI4mfN8e7UTxLnyd17eVNhsBy-dMSc,1471
25
25
  odoo/addons/stock_release_channel/static/description/icon.png,sha256=6xBPJauaFOF0KDHfHgQopSc28kKvxMaeoQFQWZtfZDo,9455
26
- odoo/addons/stock_release_channel/static/description/index.html,sha256=2_OwGy7yGmERXaKlxQnrOlfKvjtN91GatLY3c2p-Vyc,17341
26
+ odoo/addons/stock_release_channel/static/description/index.html,sha256=lppQA49hr5oJ7030aJkxoELkikhOIiZtj4oiakdrgJY,17424
27
27
  odoo/addons/stock_release_channel/static/src/js/progressbar_fractional_widget.js,sha256=sZBSmKdZSR1GFeu04iOH72h7FX5CqujgfTRmFYhh5z0,3184
28
28
  odoo/addons/stock_release_channel/static/src/scss/stock_release_channel.scss,sha256=DK0Azc8Gk3FlxeKzjZpLhRZzCQmgXdfLNmfz1CbNN0g,975
29
29
  odoo/addons/stock_release_channel/tests/__init__.py,sha256=kjERz9Kti9xbMmP0MgbNnnSDUdMRzZqH78VLjFn3xfk,226
@@ -33,13 +33,13 @@ odoo/addons/stock_release_channel/tests/test_channel_action.py,sha256=dtaYBCAOyN
33
33
  odoo/addons/stock_release_channel/tests/test_channel_computed_fields.py,sha256=TbVkrpn5Sq6nt-QRQEi2OisjkwUuvwPJ75a0V77FsM0,4725
34
34
  odoo/addons/stock_release_channel/tests/test_channel_release_batch.py,sha256=nvLf6TqcnhaA78gSpmK7Pb9unqxTm0RnY4f1QcqFlkY,2247
35
35
  odoo/addons/stock_release_channel/tests/test_release_channel.py,sha256=lOoNgnXys26yek_wqxOgqAFmho4mfIQoljfQ-NLvzMs,4481
36
- odoo/addons/stock_release_channel/tests/test_release_channel_lifecycle.py,sha256=e102LQrHpdGRYWqrVdojIf4pkr1BkVnLk7GHKKFU1X4,3875
37
- odoo/addons/stock_release_channel/tests/test_release_channel_partner.py,sha256=hr7pvlxHrpPk2pIosivIiboJZGcv4HnE8D6AZ-Zhiwc,3407
36
+ odoo/addons/stock_release_channel/tests/test_release_channel_lifecycle.py,sha256=hCtjqWMgLorYhdnzB8lp3ksmC3qTBrrVVtEMuifrVvE,4455
37
+ odoo/addons/stock_release_channel/tests/test_release_channel_partner.py,sha256=jMdMJRZ1UR6z6diA-DxRmHm-AN01J0YFEa1d9KqctPk,3471
38
38
  odoo/addons/stock_release_channel/views/res_config_settings.xml,sha256=-7hoXY3H-4sNSsSgW4Z2Un2K4Y_HB07yBhnpZspECj0,1701
39
39
  odoo/addons/stock_release_channel/views/res_partner.xml,sha256=_eJwfkaXRVNSVcg62MyTg7EJjA4fxQdCujMkDylio0Q,995
40
40
  odoo/addons/stock_release_channel/views/stock_picking_views.xml,sha256=mtspBuMsNlkKoSUw3-SR16PVxIaSj7JTQ1JfvAGwG5c,2824
41
41
  odoo/addons/stock_release_channel/views/stock_release_channel_views.xml,sha256=U_FLuzsfAAo6GIMhoa_TY5rhySQRxeWJDNeR5NF8Zoo,48125
42
- odoo_addon_stock_release_channel-16.0.2.15.1.dist-info/METADATA,sha256=CBzM-wGp8kKb4_DdkY2kdLAdx92hWMZh8798htosxHg,7154
43
- odoo_addon_stock_release_channel-16.0.2.15.1.dist-info/WHEEL,sha256=GJ7t_kWBFywbagK5eo9IoUwLW6oyOeTKmQ-9iHFVNxQ,92
44
- odoo_addon_stock_release_channel-16.0.2.15.1.dist-info/top_level.txt,sha256=qBj40grFkGOfDZ2WDSw3y1RnDlgG0u8rP8pvGNdbz4w,5
45
- odoo_addon_stock_release_channel-16.0.2.15.1.dist-info/RECORD,,
42
+ odoo_addon_stock_release_channel-16.0.2.16.0.dist-info/METADATA,sha256=IIsSe4IX33v9Oh-P47pTrdURzPoIBOMJE7_kCmdb8iI,7134
43
+ odoo_addon_stock_release_channel-16.0.2.16.0.dist-info/WHEEL,sha256=GJ7t_kWBFywbagK5eo9IoUwLW6oyOeTKmQ-9iHFVNxQ,92
44
+ odoo_addon_stock_release_channel-16.0.2.16.0.dist-info/top_level.txt,sha256=qBj40grFkGOfDZ2WDSw3y1RnDlgG0u8rP8pvGNdbz4w,5
45
+ odoo_addon_stock_release_channel-16.0.2.16.0.dist-info/RECORD,,