odoo-addon-stock-move-location 16.0.1.2.2__py3-none-any.whl → 16.0.1.3.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 @@ Move Stock Location
7
7
  !! This file is generated by oca-gen-addon-readme !!
8
8
  !! changes will be overwritten. !!
9
9
  !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
10
- !! source digest: sha256:903e53803bca6b78c5d800a4362d66413e84a4948978b62a191ef705b166f042
10
+ !! source digest: sha256:b4329a36a4a39c583bb9d25ea2fb41b23e5b90ca156223d5bf8a0d75fa0218ef
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
  {
7
7
  "name": "Move Stock Location",
8
- "version": "16.0.1.2.2",
8
+ "version": "16.0.1.3.0",
9
9
  "author": "Julius Network Solutions, "
10
10
  "BCIM,"
11
11
  "Camptocamp,"
@@ -366,7 +366,7 @@ ul.auto-toc {
366
366
  !! This file is generated by oca-gen-addon-readme !!
367
367
  !! changes will be overwritten. !!
368
368
  !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
369
- !! source digest: sha256:903e53803bca6b78c5d800a4362d66413e84a4948978b62a191ef705b166f042
369
+ !! source digest: sha256:b4329a36a4a39c583bb9d25ea2fb41b23e5b90ca156223d5bf8a0d75fa0218ef
370
370
  !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -->
371
371
  <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/stock-logistics-warehouse/tree/16.0/stock_move_location"><img alt="OCA/stock-logistics-warehouse" src="https://img.shields.io/badge/github-OCA%2Fstock--logistics--warehouse-lightgray.png?logo=github" /></a> <a class="reference external image-reference" href="https://translation.odoo-community.org/projects/stock-logistics-warehouse-16-0/stock-logistics-warehouse-16-0-stock_move_location"><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/stock-logistics-warehouse&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
372
  <p>This module allows to move entire location of products from one place to
@@ -206,6 +206,12 @@ class TestMoveLocation(TestsCommon):
206
206
  self.assertEqual(
207
207
  putaway_line.destination_location_id, self.internal_loc_2_shelf
208
208
  )
209
+ picking_action = wizard.action_move_location()
210
+ picking = self.env["stock.picking"].browse(picking_action["res_id"])
211
+ move_lines = picking.move_line_ids.filtered(
212
+ lambda sml: sml.product_id == self.product_no_lots
213
+ )
214
+ self.assertEqual(move_lines.location_dest_id, self.internal_loc_2_shelf)
209
215
 
210
216
  def test_delivery_order_assignation_after_transfer(self):
211
217
  """
@@ -7,26 +7,13 @@ from itertools import groupby
7
7
 
8
8
  from odoo import api, fields, models
9
9
  from odoo.fields import first
10
+ from odoo.osv import expression
10
11
 
11
12
 
12
13
  class StockMoveLocationWizard(models.TransientModel):
13
14
  _name = "wiz.stock.move.location"
14
15
  _description = "Wizard move location"
15
16
 
16
- def _get_default_picking_type_id(self):
17
- company_id = self.env.context.get("company_id") or self.env.user.company_id.id
18
- return (
19
- self.env["stock.picking.type"]
20
- .search(
21
- [
22
- ("code", "=", "internal"),
23
- ("warehouse_id.company_id", "=", company_id),
24
- ],
25
- limit=1,
26
- )
27
- .id
28
- )
29
-
30
17
  origin_location_disable = fields.Boolean(
31
18
  compute="_compute_readonly_locations",
32
19
  help="technical field to disable the edition of origin location.",
@@ -53,7 +40,10 @@ class StockMoveLocationWizard(models.TransientModel):
53
40
  string="Move Location lines",
54
41
  )
55
42
  picking_type_id = fields.Many2one(
56
- comodel_name="stock.picking.type", default=_get_default_picking_type_id
43
+ compute="_compute_picking_type_id",
44
+ comodel_name="stock.picking.type",
45
+ readonly=False,
46
+ store=True,
57
47
  )
58
48
  picking_id = fields.Many2one(
59
49
  string="Connected Picking", comodel_name="stock.picking"
@@ -74,6 +64,28 @@ class StockMoveLocationWizard(models.TransientModel):
74
64
  rec.origin_location_disable = True
75
65
  rec.destination_location_disable = True
76
66
 
67
+ @api.depends_context("company")
68
+ @api.depends("origin_location_id")
69
+ def _compute_picking_type_id(self):
70
+ company_id = self.env.context.get("company_id") or self.env.user.company_id.id
71
+ for rec in self:
72
+ picking_type = self.env["stock.picking.type"]
73
+ base_domain = [
74
+ ("code", "=", "internal"),
75
+ ("warehouse_id.company_id", "=", company_id),
76
+ ]
77
+ if rec.origin_location_id:
78
+ location_id = rec.origin_location_id
79
+ while location_id and not picking_type:
80
+ domain = [("default_location_src_id", "=", location_id.id)]
81
+ domain = expression.AND([base_domain, domain])
82
+ picking_type = picking_type.search(domain, limit=1)
83
+ # Move up to the parent location if no picking type found
84
+ location_id = not picking_type and location_id.location_id or False
85
+ if not picking_type:
86
+ picking_type = picking_type.search(base_domain, limit=1)
87
+ rec.picking_type_id = picking_type.id
88
+
77
89
  @api.model
78
90
  def default_get(self, fields):
79
91
  res = super().default_get(fields)
@@ -98,7 +98,7 @@ class StockMoveLocationWizardLine(models.TransientModel):
98
98
  self.ensure_one()
99
99
  location_dest_id = (
100
100
  self.move_location_wizard_id.apply_putaway_strategy
101
- and self.destination_location_id.get_putaway_strategy(self.product_id).id
101
+ and self.destination_location_id._get_putaway_strategy(self.product_id).id
102
102
  or self.destination_location_id.id
103
103
  )
104
104
  qty_todo, qty_done = self._get_available_quantity()
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: odoo-addon-stock-move-location
3
- Version: 16.0.1.2.2
3
+ Version: 16.0.1.3.0
4
4
  Summary: This module allows to move all stock in a stock location to an other one.
5
5
  Home-page: https://github.com/OCA/stock-logistics-warehouse
6
6
  Author: Julius Network Solutions, BCIM,Camptocamp,Odoo Community Association (OCA)
@@ -23,7 +23,7 @@ Move Stock Location
23
23
  !! This file is generated by oca-gen-addon-readme !!
24
24
  !! changes will be overwritten. !!
25
25
  !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
26
- !! source digest: sha256:903e53803bca6b78c5d800a4362d66413e84a4948978b62a191ef705b166f042
26
+ !! source digest: sha256:b4329a36a4a39c583bb9d25ea2fb41b23e5b90ca156223d5bf8a0d75fa0218ef
27
27
  !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
28
28
 
29
29
  .. |badge1| image:: https://img.shields.io/badge/maturity-Beta-yellow.png
@@ -1,6 +1,6 @@
1
- odoo/addons/stock_move_location/README.rst,sha256=p03dOyA1H4TnDaGRUJ_V8jIdstZSI5-DMgpDjnNjClg,6280
1
+ odoo/addons/stock_move_location/README.rst,sha256=8GxXeXA-qBBrbaV-4LTW3zEG0UpppUZRXT6YYJah2so,6280
2
2
  odoo/addons/stock_move_location/__init__.py,sha256=a529MU97ndMyMZsToYJmFXUHanvFmTyIZL9lmHsflPM,88
3
- odoo/addons/stock_move_location/__manifest__.py,sha256=tcLWwJtKnK1FJf1H61fQmzz1YDxQVF3dUoizKF_2YR8,901
3
+ odoo/addons/stock_move_location/__manifest__.py,sha256=Lc7Wf8ReP5f2U3YePeJ86sGvOR5s0BlTmNFRP-VI38E,901
4
4
  odoo/addons/stock_move_location/init_hook.py,sha256=iIIjLsKG3z1Esn7A_tiIQZ9jXPvVs6EIhtNICdv-FQA,419
5
5
  odoo/addons/stock_move_location/data/stock_quant_view.xml,sha256=g7KS13Q9jEIZTKiNHjWrFcggfYyfK2ZW2VONnCLSZaI,635
6
6
  odoo/addons/stock_move_location/i18n/de.po,sha256=fS9Z6po8XinTgKYyVhcPgld_LU8F4U-86YxWLqj7610,11196
@@ -23,18 +23,18 @@ odoo/addons/stock_move_location/readme/ROADMAP.md,sha256=HW9tNWBGh6oAjRj8qWMlXPc
23
23
  odoo/addons/stock_move_location/readme/USAGE.md,sha256=sT_tcsfaJ6sG7y1ogNpTQzTBh8qzx2t5vbgjV_zW_Cw,2055
24
24
  odoo/addons/stock_move_location/security/ir.model.access.csv,sha256=sLpkI9b3t8YdWBbYPjzlQrCbmv-_C0bUwzd10cMF14M,338
25
25
  odoo/addons/stock_move_location/static/description/icon.png,sha256=6xBPJauaFOF0KDHfHgQopSc28kKvxMaeoQFQWZtfZDo,9455
26
- odoo/addons/stock_move_location/static/description/index.html,sha256=Hc3ZmJwWn4_sOToeJ4RhmgyEpxe7-NHGPJBDHJ-9aD0,17050
26
+ odoo/addons/stock_move_location/static/description/index.html,sha256=OLRq7XqQAz89dDl5xni9a1BwtjOUzn6JxfHgFCaCeQY,17050
27
27
  odoo/addons/stock_move_location/tests/__init__.py,sha256=gDGhCnhTYQONkRkGhPtOhgWTJ8sj6zs-sl2YRRvqGvQ,98
28
28
  odoo/addons/stock_move_location/tests/test_common.py,sha256=YiCuKwGt6Tt5vli0Iiwgv3gmGb2xU0irK87K1hCimQQ,6112
29
- odoo/addons/stock_move_location/tests/test_move_location.py,sha256=_dJxpK5wvZ3z2zdmIrg5dA0-pUD9Ug4UXiHCLBM6xiU,12108
29
+ odoo/addons/stock_move_location/tests/test_move_location.py,sha256=_HjZ0Gy4UXPNUlG-SJAG4WQpc_zvTitkOv1LitWHDNE,12447
30
30
  odoo/addons/stock_move_location/tests/test_stock_fillwithstock.py,sha256=BvMF_7nubCdd_o337qjQxJMdZ3WzGd8--DyDkkv6c-g,2838
31
31
  odoo/addons/stock_move_location/views/stock_picking.xml,sha256=isH25PIq7A2rfCUzk9_HFYA8WIoGm5HNDu-N3CJazRQ,730
32
32
  odoo/addons/stock_move_location/views/stock_picking_type_views.xml,sha256=V8_fzqt7ga3O8U81JNbb8NOuT0JHsXwC2bG1jqJvmAk,1483
33
33
  odoo/addons/stock_move_location/wizard/__init__.py,sha256=0YXi68VJIkwZDO1-ZFirM2ANY3Mi7PEPdYW0Gg46lmY,239
34
- odoo/addons/stock_move_location/wizard/stock_move_location.py,sha256=OAoLF_rCzsYKAZwqWx1TThbi0qGnT7zG-q_LfnQwheo,14338
34
+ odoo/addons/stock_move_location/wizard/stock_move_location.py,sha256=zPp4RtOT-Ibkz46fqhkDwgg377AA-t8z2ZnSffOSN1g,15115
35
35
  odoo/addons/stock_move_location/wizard/stock_move_location.xml,sha256=6DjFtlJJuJM31rrPjpu1hGrRdrj2iHGvDbRnUozRiSg,7878
36
- odoo/addons/stock_move_location/wizard/stock_move_location_line.py,sha256=X756gw7-d479UmJvvDemKlgnXPpjuE3igDv5IRa0ucs,6322
37
- odoo_addon_stock_move_location-16.0.1.2.2.dist-info/METADATA,sha256=AOZi6WMZ7yU2JvL_zGnrXfkPpEO61x2VmzDCHzeDES8,6911
38
- odoo_addon_stock_move_location-16.0.1.2.2.dist-info/WHEEL,sha256=oiQVh_5PnQM0E3gPdiz09WCNmwiHDMaGer_elqB3coM,92
39
- odoo_addon_stock_move_location-16.0.1.2.2.dist-info/top_level.txt,sha256=qBj40grFkGOfDZ2WDSw3y1RnDlgG0u8rP8pvGNdbz4w,5
40
- odoo_addon_stock_move_location-16.0.1.2.2.dist-info/RECORD,,
36
+ odoo/addons/stock_move_location/wizard/stock_move_location_line.py,sha256=7ORteDfC0RzWBEYuzlr6yn7_XN__VdyfJ31OkJ_mIwM,6323
37
+ odoo_addon_stock_move_location-16.0.1.3.0.dist-info/METADATA,sha256=pJdQTlZtajUAzPUGlYEqoZO14hUUkShKTAtuf9671X8,6911
38
+ odoo_addon_stock_move_location-16.0.1.3.0.dist-info/WHEEL,sha256=GJ7t_kWBFywbagK5eo9IoUwLW6oyOeTKmQ-9iHFVNxQ,92
39
+ odoo_addon_stock_move_location-16.0.1.3.0.dist-info/top_level.txt,sha256=qBj40grFkGOfDZ2WDSw3y1RnDlgG0u8rP8pvGNdbz4w,5
40
+ odoo_addon_stock_move_location-16.0.1.3.0.dist-info/RECORD,,
@@ -1,5 +1,5 @@
1
1
  Wheel-Version: 1.0
2
- Generator: bdist_wheel (0.42.0)
2
+ Generator: bdist_wheel (0.43.0)
3
3
  Root-Is-Purelib: true
4
4
  Tag: py3-none-any
5
5