odoo-addon-stock-move-location 16.0.1.4.0.2__py3-none-any.whl → 18.0.1.0.0.3__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_move_location/README.rst +48 -48
- odoo/addons/stock_move_location/__manifest__.py +1 -1
- odoo/addons/stock_move_location/i18n/stock_move_location.pot +37 -10
- odoo/addons/stock_move_location/init_hook.py +1 -5
- odoo/addons/stock_move_location/models/stock_picking.py +9 -7
- odoo/addons/stock_move_location/readme/CONTRIBUTORS.md +2 -0
- odoo/addons/stock_move_location/readme/USAGE.md +0 -1
- odoo/addons/stock_move_location/static/description/index.html +12 -12
- odoo/addons/stock_move_location/tests/test_common.py +16 -13
- odoo/addons/stock_move_location/tests/test_move_location.py +19 -24
- odoo/addons/stock_move_location/tests/test_stock_fillwithstock.py +23 -28
- odoo/addons/stock_move_location/views/stock_picking.xml +1 -3
- odoo/addons/stock_move_location/views/stock_picking_type_views.xml +4 -7
- odoo/addons/stock_move_location/wizard/stock_move_location.py +46 -61
- odoo/addons/stock_move_location/wizard/stock_move_location.xml +60 -32
- odoo/addons/stock_move_location/wizard/stock_move_location_line.py +18 -30
- {odoo_addon_stock_move_location-16.0.1.4.0.2.dist-info → odoo_addon_stock_move_location-18.0.1.0.0.3.dist-info}/METADATA +53 -53
- {odoo_addon_stock_move_location-16.0.1.4.0.2.dist-info → odoo_addon_stock_move_location-18.0.1.0.0.3.dist-info}/RECORD +20 -20
- {odoo_addon_stock_move_location-16.0.1.4.0.2.dist-info → odoo_addon_stock_move_location-18.0.1.0.0.3.dist-info}/WHEEL +1 -1
- odoo_addon_stock_move_location-18.0.1.0.0.3.dist-info/top_level.txt +1 -0
- odoo_addon_stock_move_location-16.0.1.4.0.2.dist-info/top_level.txt +0 -1
@@ -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:
|
10
|
+
!! source digest: sha256:d4e4ea6fb0a6f2f34b451c22d5ab139e4f867621b65786664f6b93d57558b66d
|
11
11
|
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
|
12
12
|
|
13
13
|
.. |badge1| image:: https://img.shields.io/badge/maturity-Beta-yellow.png
|
@@ -17,13 +17,13 @@ Move Stock Location
|
|
17
17
|
:target: http://www.gnu.org/licenses/agpl-3.0-standalone.html
|
18
18
|
:alt: License: AGPL-3
|
19
19
|
.. |badge3| image:: https://img.shields.io/badge/github-OCA%2Fstock--logistics--warehouse-lightgray.png?logo=github
|
20
|
-
:target: https://github.com/OCA/stock-logistics-warehouse/tree/
|
20
|
+
:target: https://github.com/OCA/stock-logistics-warehouse/tree/18.0/stock_move_location
|
21
21
|
:alt: OCA/stock-logistics-warehouse
|
22
22
|
.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png
|
23
|
-
:target: https://translation.odoo-community.org/projects/stock-logistics-warehouse-
|
23
|
+
:target: https://translation.odoo-community.org/projects/stock-logistics-warehouse-18-0/stock-logistics-warehouse-18-0-stock_move_location
|
24
24
|
:alt: Translate me on Weblate
|
25
25
|
.. |badge5| image:: https://img.shields.io/badge/runboat-Try%20me-875A7B.png
|
26
|
-
:target: https://runboat.odoo-community.org/builds?repo=OCA/stock-logistics-warehouse&target_branch=
|
26
|
+
:target: https://runboat.odoo-community.org/builds?repo=OCA/stock-logistics-warehouse&target_branch=18.0
|
27
27
|
:alt: Try me on Runboat
|
28
28
|
|
29
29
|
|badge1| |badge2| |badge3| |badge4| |badge5|
|
@@ -39,27 +39,25 @@ another and move only selected quantities.
|
|
39
39
|
Usage
|
40
40
|
=====
|
41
41
|
|
42
|
-
-
|
43
|
-
|
44
|
-
-
|
45
|
-
|
46
|
-
-
|
47
|
-
|
48
|
-
|
49
|
-
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
automatically
|
42
|
+
- A new menu item Operations > Move from location... opens a wizard
|
43
|
+
where 2 locations can be specified.
|
44
|
+
- Select origin and destination locations and press "IMMEDIATE TRANSFER"
|
45
|
+
or "PLANNED TRANSFER"
|
46
|
+
- Those lines can be edited. Move quantity can't be more than a max
|
47
|
+
available quantity
|
48
|
+
- Move doesn't care about the reservations and will move stuff anyway
|
49
|
+
- If during your operation with the wizard the real quantity will change
|
50
|
+
it will move only the available quantity at the button press
|
51
|
+
- Products will be moved and a form view of picking that did that will
|
52
|
+
show up
|
53
|
+
- If "PLANNED TRANSFER" is used - the picking won't be validated
|
54
|
+
automatically
|
56
55
|
|
57
56
|
If you want to transfer a full quant:
|
58
57
|
|
59
|
-
-
|
60
|
-
|
61
|
-
|
62
|
-
- Select the quantities which you want move to another location
|
58
|
+
- Go to Inventory > Products > Products and click "On hand" smart button
|
59
|
+
or Inventory > Reporting > Inventory, the quants view will be opened.
|
60
|
+
- Select the quantities which you want move to another location
|
63
61
|
|
64
62
|
If you go to the Inventory Dashboard you can see the button "Move from
|
65
63
|
location" in each of the picking types (only applicable to internal and
|
@@ -92,14 +90,14 @@ Known issues / Roadmap
|
|
92
90
|
Change the current implementation (suggested by Denis Roussel from
|
93
91
|
ACSONE):
|
94
92
|
|
95
|
-
-
|
96
|
-
|
97
|
-
-
|
98
|
-
-
|
99
|
-
|
100
|
-
-
|
101
|
-
|
102
|
-
|
93
|
+
- A new parameter on stock picking types : 'Product Change Location'
|
94
|
+
(with a little help).
|
95
|
+
- With this, go to the dashboard, create a picking with that type.
|
96
|
+
- Add a button on the picking form which is visible with that type that
|
97
|
+
fill in the picking as now
|
98
|
+
- Nice to have: add a magic button on locations that with context
|
99
|
+
creates a new picking of that type with the origin location already
|
100
|
+
filled in.
|
103
101
|
|
104
102
|
Bug Tracker
|
105
103
|
===========
|
@@ -107,7 +105,7 @@ Bug Tracker
|
|
107
105
|
Bugs are tracked on `GitHub Issues <https://github.com/OCA/stock-logistics-warehouse/issues>`_.
|
108
106
|
In case of trouble, please check there if your issue has already been reported.
|
109
107
|
If you spotted it first, help us to smash it by providing a detailed and welcomed
|
110
|
-
`feedback <https://github.com/OCA/stock-logistics-warehouse/issues/new?body=module:%20stock_move_location%0Aversion:%
|
108
|
+
`feedback <https://github.com/OCA/stock-logistics-warehouse/issues/new?body=module:%20stock_move_location%0Aversion:%2018.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**>`_.
|
111
109
|
|
112
110
|
Do not contact contributors directly about support or help with technical issues.
|
113
111
|
|
@@ -124,26 +122,28 @@ Authors
|
|
124
122
|
Contributors
|
125
123
|
------------
|
126
124
|
|
127
|
-
-
|
128
|
-
-
|
129
|
-
-
|
130
|
-
-
|
131
|
-
-
|
132
|
-
-
|
133
|
-
-
|
125
|
+
- Mathieu Vatel <mathieu@julius.fr>
|
126
|
+
- Mykhailo Panarin <m.panarin@mobilunity.com>
|
127
|
+
- Joan Sisquella <joan.sisquella@forgeflow.com>
|
128
|
+
- Jordi Ballester Alomar <jordi.ballester@forgeflow.com>
|
129
|
+
- Lois Rilo <lois.rilo@forgeflow.com>
|
130
|
+
- Héctor Villarreal <hector.villarreal@forgeflow.com>
|
131
|
+
- Tecnativa <tecnativa.com>
|
134
132
|
|
135
|
-
|
136
|
-
|
133
|
+
- Sergio Teruel
|
134
|
+
- João Marques
|
135
|
+
- Carlos Roca
|
137
136
|
|
138
|
-
-
|
139
|
-
-
|
140
|
-
-
|
141
|
-
-
|
142
|
-
-
|
137
|
+
- Jacques-Etienne Baudoux <je@bcim.be>
|
138
|
+
- Iryna Vyshnevska <i.vyshnevska@mobilunity.com>
|
139
|
+
- Alexei Rivera <arivera@archeti.com>
|
140
|
+
- Abraham Anes <abraham@studio73.es>
|
141
|
+
- Quartile <https://www.quartile.co>
|
143
142
|
|
144
|
-
|
143
|
+
- Aung Ko Ko Lin
|
145
144
|
|
146
|
-
-
|
145
|
+
- Laurent Mignon <laurent.mignon@acsone.eu>
|
146
|
+
- Maksym Yankin <maksym.yankin@camptocamp.com>
|
147
147
|
|
148
148
|
Maintainers
|
149
149
|
-----------
|
@@ -158,6 +158,6 @@ OCA, or the Odoo Community Association, is a nonprofit organization whose
|
|
158
158
|
mission is to support the collaborative development of Odoo features and
|
159
159
|
promote its widespread use.
|
160
160
|
|
161
|
-
This module is part of the `OCA/stock-logistics-warehouse <https://github.com/OCA/stock-logistics-warehouse/tree/
|
161
|
+
This module is part of the `OCA/stock-logistics-warehouse <https://github.com/OCA/stock-logistics-warehouse/tree/18.0/stock_move_location>`_ project on GitHub.
|
162
162
|
|
163
163
|
You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.
|
@@ -4,7 +4,7 @@
|
|
4
4
|
#
|
5
5
|
msgid ""
|
6
6
|
msgstr ""
|
7
|
-
"Project-Id-Version: Odoo Server
|
7
|
+
"Project-Id-Version: Odoo Server 18.0\n"
|
8
8
|
"Report-Msgid-Bugs-To: \n"
|
9
9
|
"Last-Translator: \n"
|
10
10
|
"Language-Team: \n"
|
@@ -28,6 +28,11 @@ msgstr ""
|
|
28
28
|
msgid "Cancel"
|
29
29
|
msgstr ""
|
30
30
|
|
31
|
+
#. module: stock_move_location
|
32
|
+
#: model:ir.model.fields,field_description:stock_move_location.field_wiz_stock_move_location__company_id
|
33
|
+
msgid "Company"
|
34
|
+
msgstr ""
|
35
|
+
|
31
36
|
#. module: stock_move_location
|
32
37
|
#: model:ir.model.fields,field_description:stock_move_location.field_wiz_stock_move_location__picking_id
|
33
38
|
msgid "Connected Picking"
|
@@ -69,9 +74,20 @@ msgstr ""
|
|
69
74
|
|
70
75
|
#. module: stock_move_location
|
71
76
|
#: model:ir.model.fields,field_description:stock_move_location.field_wiz_stock_move_location__edit_locations
|
77
|
+
#: model_terms:ir.ui.view,arch_db:stock_move_location.view_wiz_stock_move_location_form_stock_move_location
|
72
78
|
msgid "Edit Locations"
|
73
79
|
msgstr ""
|
74
80
|
|
81
|
+
#. module: stock_move_location
|
82
|
+
#: model:ir.model.fields,field_description:stock_move_location.field_wiz_stock_move_location__exclude_reserved_qty
|
83
|
+
msgid "Exclude Reserved Qty"
|
84
|
+
msgstr ""
|
85
|
+
|
86
|
+
#. module: stock_move_location
|
87
|
+
#: model_terms:ir.ui.view,arch_db:stock_move_location.view_wiz_stock_move_location_form_stock_move_location
|
88
|
+
msgid "Exclude Reserved Quantities"
|
89
|
+
msgstr ""
|
90
|
+
|
75
91
|
#. module: stock_move_location
|
76
92
|
#: model_terms:ir.ui.view,arch_db:stock_move_location.view_picking_form
|
77
93
|
msgid "Fill with stock"
|
@@ -93,12 +109,6 @@ msgstr ""
|
|
93
109
|
msgid "Immediate Transfer"
|
94
110
|
msgstr ""
|
95
111
|
|
96
|
-
#. module: stock_move_location
|
97
|
-
#: model:ir.model.fields,field_description:stock_move_location.field_wiz_stock_move_location____last_update
|
98
|
-
#: model:ir.model.fields,field_description:stock_move_location.field_wiz_stock_move_location_line____last_update
|
99
|
-
msgid "Last Modified on"
|
100
|
-
msgstr ""
|
101
|
-
|
102
112
|
#. module: stock_move_location
|
103
113
|
#: model:ir.model.fields,field_description:stock_move_location.field_wiz_stock_move_location__write_uid
|
104
114
|
#: model:ir.model.fields,field_description:stock_move_location.field_wiz_stock_move_location_line__write_uid
|
@@ -111,6 +121,11 @@ msgstr ""
|
|
111
121
|
msgid "Last Updated on"
|
112
122
|
msgstr ""
|
113
123
|
|
124
|
+
#. module: stock_move_location
|
125
|
+
#: model_terms:ir.ui.view,arch_db:stock_move_location.view_wiz_stock_move_location_form_stock_move_location
|
126
|
+
msgid "Lot/SN:"
|
127
|
+
msgstr ""
|
128
|
+
|
114
129
|
#. module: stock_move_location
|
115
130
|
#: model:ir.model.fields,field_description:stock_move_location.field_wiz_stock_move_location_line__lot_id
|
116
131
|
msgid "Lot/Serial Number"
|
@@ -145,7 +160,6 @@ msgstr ""
|
|
145
160
|
#. module: stock_move_location
|
146
161
|
#. odoo-python
|
147
162
|
#: code:addons/stock_move_location/wizard/stock_move_location_line.py:0
|
148
|
-
#, python-format
|
149
163
|
msgid "Move quantity can not exceed max quantity or be negative"
|
150
164
|
msgstr ""
|
151
165
|
|
@@ -157,7 +171,6 @@ msgstr ""
|
|
157
171
|
#. module: stock_move_location
|
158
172
|
#. odoo-python
|
159
173
|
#: code:addons/stock_move_location/models/stock_picking.py:0
|
160
|
-
#, python-format
|
161
174
|
msgid "Moves lines already exists"
|
162
175
|
msgstr ""
|
163
176
|
|
@@ -196,7 +209,6 @@ msgstr ""
|
|
196
209
|
#. module: stock_move_location
|
197
210
|
#. odoo-python
|
198
211
|
#: code:addons/stock_move_location/models/stock_picking.py:0
|
199
|
-
#, python-format
|
200
212
|
msgid "Please choose a source end location"
|
201
213
|
msgstr ""
|
202
214
|
|
@@ -210,6 +222,11 @@ msgstr ""
|
|
210
222
|
msgid "Product Unit of Measure"
|
211
223
|
msgstr ""
|
212
224
|
|
225
|
+
#. module: stock_move_location
|
226
|
+
#: model_terms:ir.ui.view,arch_db:stock_move_location.view_wiz_stock_move_location_form_stock_move_location
|
227
|
+
msgid "Quantity"
|
228
|
+
msgstr ""
|
229
|
+
|
213
230
|
#. module: stock_move_location
|
214
231
|
#: model:ir.model.fields,field_description:stock_move_location.field_wiz_stock_move_location_line__move_quantity
|
215
232
|
msgid "Quantity to move"
|
@@ -237,11 +254,21 @@ msgstr ""
|
|
237
254
|
msgid "Stock Move"
|
238
255
|
msgstr ""
|
239
256
|
|
257
|
+
#. module: stock_move_location
|
258
|
+
#: model:ir.model.fields,field_description:stock_move_location.field_wiz_stock_move_location_line__total_quantity
|
259
|
+
msgid "Total existence quantity"
|
260
|
+
msgstr ""
|
261
|
+
|
240
262
|
#. module: stock_move_location
|
241
263
|
#: model:ir.model,name:stock_move_location.model_stock_picking
|
242
264
|
msgid "Transfer"
|
243
265
|
msgstr ""
|
244
266
|
|
267
|
+
#. module: stock_move_location
|
268
|
+
#: model_terms:ir.ui.view,arch_db:stock_move_location.view_wiz_stock_move_location_form_stock_move_location
|
269
|
+
msgid "Unit of Measure"
|
270
|
+
msgstr ""
|
271
|
+
|
245
272
|
#. module: stock_move_location
|
246
273
|
#: model_terms:ir.ui.view,arch_db:stock_move_location.view_wiz_stock_move_location_form_stock_move_location
|
247
274
|
msgid "UoM"
|
@@ -1,9 +1,5 @@
|
|
1
1
|
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
def enable_multi_locations(cr, registry):
|
6
|
-
env = api.Environment(cr, SUPERUSER_ID, {})
|
2
|
+
def enable_multi_locations(env):
|
7
3
|
ResConfig = env["res.config.settings"]
|
8
4
|
default_values = ResConfig.default_get(list(ResConfig.fields_get()))
|
9
5
|
default_values.update({"group_stock_multi_locations": True})
|
@@ -17,7 +17,6 @@ class StockPicking(models.Model):
|
|
17
17
|
context = {
|
18
18
|
"active_ids": self._get_movable_quants().ids,
|
19
19
|
"active_model": "stock.quant",
|
20
|
-
"only_reserved_qty": True,
|
21
20
|
"planned": True,
|
22
21
|
}
|
23
22
|
move_wizard = (
|
@@ -32,7 +31,6 @@ class StockPicking(models.Model):
|
|
32
31
|
}
|
33
32
|
)
|
34
33
|
)
|
35
|
-
move_wizard._onchange_destination_location_id()
|
36
34
|
move_wizard.action_move_location()
|
37
35
|
return True
|
38
36
|
|
@@ -43,9 +41,13 @@ class StockPicking(models.Model):
|
|
43
41
|
raise UserError(_("Moves lines already exists"))
|
44
42
|
|
45
43
|
def _get_movable_quants(self):
|
46
|
-
return
|
47
|
-
[
|
48
|
-
|
49
|
-
|
50
|
-
|
44
|
+
return (
|
45
|
+
self.env["stock.quant"]
|
46
|
+
.search(
|
47
|
+
[
|
48
|
+
("location_id", "=", self.location_id.id),
|
49
|
+
("quantity", ">", 0.0),
|
50
|
+
]
|
51
|
+
)
|
52
|
+
.filtered(lambda quant: quant.quantity - quant.reserved_quantity > 0.0)
|
51
53
|
)
|
@@ -7,6 +7,7 @@
|
|
7
7
|
- Tecnativa \<tecnativa.com\>
|
8
8
|
- Sergio Teruel
|
9
9
|
- João Marques
|
10
|
+
- Carlos Roca
|
10
11
|
- Jacques-Etienne Baudoux \<<je@bcim.be>\>
|
11
12
|
- Iryna Vyshnevska \<<i.vyshnevska@mobilunity.com>\>
|
12
13
|
- Alexei Rivera \<<arivera@archeti.com>\>
|
@@ -14,3 +15,4 @@
|
|
14
15
|
- Quartile \<<https://www.quartile.co>\>
|
15
16
|
- Aung Ko Ko Lin
|
16
17
|
- Laurent Mignon \<<laurent.mignon@acsone.eu>\>
|
18
|
+
- Maksym Yankin \<<maksym.yankin@camptocamp.com>\>
|
@@ -2,7 +2,6 @@
|
|
2
2
|
can be specified.
|
3
3
|
- Select origin and destination locations and press "IMMEDIATE TRANSFER" or "PLANNED
|
4
4
|
TRANSFER"
|
5
|
-
- Press ADD ALL button to add all products available
|
6
5
|
- Those lines can be edited. Move quantity can't be more than a max available quantity
|
7
6
|
- Move doesn't care about the reservations and will move stuff anyway
|
8
7
|
- If during your operation with the wizard the real quantity will change it will move
|
@@ -367,9 +367,9 @@ ul.auto-toc {
|
|
367
367
|
!! This file is generated by oca-gen-addon-readme !!
|
368
368
|
!! changes will be overwritten. !!
|
369
369
|
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
|
370
|
-
!! source digest: sha256:
|
370
|
+
!! source digest: sha256:d4e4ea6fb0a6f2f34b451c22d5ab139e4f867621b65786664f6b93d57558b66d
|
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/stock-logistics-warehouse/tree/
|
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/stock-logistics-warehouse/tree/18.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-18-0/stock-logistics-warehouse-18-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&target_branch=18.0"><img alt="Try me on Runboat" src="https://img.shields.io/badge/runboat-Try%20me-875A7B.png" /></a></p>
|
373
373
|
<p>This module allows to move entire location of products from one place to
|
374
374
|
another and move only selected quantities.</p>
|
375
375
|
<p><strong>Table of contents</strong></p>
|
@@ -391,14 +391,13 @@ another and move only selected quantities.</p>
|
|
391
391
|
<ul class="simple">
|
392
392
|
<li>A new menu item Operations > Move from location… opens a wizard
|
393
393
|
where 2 locations can be specified.</li>
|
394
|
-
<li>Select origin and destination locations and press “IMMEDIATE
|
395
|
-
|
396
|
-
<li>Press ADD ALL button to add all products available</li>
|
394
|
+
<li>Select origin and destination locations and press “IMMEDIATE TRANSFER”
|
395
|
+
or “PLANNED TRANSFER”</li>
|
397
396
|
<li>Those lines can be edited. Move quantity can’t be more than a max
|
398
397
|
available quantity</li>
|
399
398
|
<li>Move doesn’t care about the reservations and will move stuff anyway</li>
|
400
|
-
<li>If during your operation with the wizard the real quantity will
|
401
|
-
|
399
|
+
<li>If during your operation with the wizard the real quantity will change
|
400
|
+
it will move only the available quantity at the button press</li>
|
402
401
|
<li>Products will be moved and a form view of picking that did that will
|
403
402
|
show up</li>
|
404
403
|
<li>If “PLANNED TRANSFER” is used - the picking won’t be validated
|
@@ -406,9 +405,8 @@ automatically</li>
|
|
406
405
|
</ul>
|
407
406
|
<p>If you want to transfer a full quant:</p>
|
408
407
|
<ul class="simple">
|
409
|
-
<li>Go to Inventory > Products > Products and click “On hand” smart
|
410
|
-
|
411
|
-
opened.</li>
|
408
|
+
<li>Go to Inventory > Products > Products and click “On hand” smart button
|
409
|
+
or Inventory > Reporting > Inventory, the quants view will be opened.</li>
|
412
410
|
<li>Select the quantities which you want move to another location</li>
|
413
411
|
</ul>
|
414
412
|
<p>If you go to the Inventory Dashboard you can see the button “Move from
|
@@ -448,7 +446,7 @@ filled in.</li>
|
|
448
446
|
<p>Bugs are tracked on <a class="reference external" href="https://github.com/OCA/stock-logistics-warehouse/issues">GitHub Issues</a>.
|
449
447
|
In case of trouble, please check there if your issue has already been reported.
|
450
448
|
If you spotted it first, help us to smash it by providing a detailed and welcomed
|
451
|
-
<a class="reference external" href="https://github.com/OCA/stock-logistics-warehouse/issues/new?body=module:%20stock_move_location%0Aversion:%
|
449
|
+
<a class="reference external" href="https://github.com/OCA/stock-logistics-warehouse/issues/new?body=module:%20stock_move_location%0Aversion:%2018.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**">feedback</a>.</p>
|
452
450
|
<p>Do not contact contributors directly about support or help with technical issues.</p>
|
453
451
|
</div>
|
454
452
|
<div class="section" id="credits">
|
@@ -473,6 +471,7 @@ If you spotted it first, help us to smash it by providing a detailed and welcome
|
|
473
471
|
<li>Tecnativa <tecnativa.com><ul>
|
474
472
|
<li>Sergio Teruel</li>
|
475
473
|
<li>João Marques</li>
|
474
|
+
<li>Carlos Roca</li>
|
476
475
|
</ul>
|
477
476
|
</li>
|
478
477
|
<li>Jacques-Etienne Baudoux <<a class="reference external" href="mailto:je@bcim.be">je@bcim.be</a>></li>
|
@@ -484,6 +483,7 @@ If you spotted it first, help us to smash it by providing a detailed and welcome
|
|
484
483
|
</ul>
|
485
484
|
</li>
|
486
485
|
<li>Laurent Mignon <<a class="reference external" href="mailto:laurent.mignon@acsone.eu">laurent.mignon@acsone.eu</a>></li>
|
486
|
+
<li>Maksym Yankin <<a class="reference external" href="mailto:maksym.yankin@camptocamp.com">maksym.yankin@camptocamp.com</a>></li>
|
487
487
|
</ul>
|
488
488
|
</div>
|
489
489
|
<div class="section" id="maintainers">
|
@@ -495,7 +495,7 @@ If you spotted it first, help us to smash it by providing a detailed and welcome
|
|
495
495
|
<p>OCA, or the Odoo Community Association, is a nonprofit organization whose
|
496
496
|
mission is to support the collaborative development of Odoo features and
|
497
497
|
promote its widespread use.</p>
|
498
|
-
<p>This module is part of the <a class="reference external" href="https://github.com/OCA/stock-logistics-warehouse/tree/
|
498
|
+
<p>This module is part of the <a class="reference external" href="https://github.com/OCA/stock-logistics-warehouse/tree/18.0/stock_move_location">OCA/stock-logistics-warehouse</a> project on GitHub.</p>
|
499
499
|
<p>You are welcome to contribute. To learn how please visit <a class="reference external" href="https://odoo-community.org/page/Contribute">https://odoo-community.org/page/Contribute</a>.</p>
|
500
500
|
</div>
|
501
501
|
</div>
|
@@ -1,17 +1,17 @@
|
|
1
1
|
# Copyright (C) 2011 Julius Network Solutions SARL <contact@julius.fr>
|
2
2
|
# Copyright 2018 Camptocamp SA
|
3
3
|
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl)
|
4
|
+
from odoo.tests import Form
|
4
5
|
|
5
|
-
from odoo.tests import
|
6
|
+
from odoo.addons.base.tests.common import BaseCommon
|
6
7
|
|
7
8
|
|
8
|
-
class TestsCommon(
|
9
|
+
class TestsCommon(BaseCommon):
|
9
10
|
@classmethod
|
10
11
|
def setUpClass(cls):
|
11
12
|
super().setUpClass()
|
12
|
-
cls.env = cls.env(context=dict(cls.env.context, tracking_disable=True))
|
13
13
|
cls.location_obj = cls.env["stock.location"]
|
14
|
-
product_obj = cls.env["product.product"]
|
14
|
+
cls.product_obj = cls.env["product.product"]
|
15
15
|
cls.wizard_obj = cls.env["wiz.stock.move.location"]
|
16
16
|
cls.quant_obj = cls.env["stock.quant"]
|
17
17
|
cls.company = cls.env.ref("base.main_company")
|
@@ -43,14 +43,14 @@ class TestsCommon(common.TransactionCase):
|
|
43
43
|
}
|
44
44
|
)
|
45
45
|
cls.uom_unit = cls.env.ref("uom.product_uom_unit")
|
46
|
-
cls.product_no_lots = product_obj.create(
|
47
|
-
{"name": "Pineapple", "
|
46
|
+
cls.product_no_lots = cls.product_obj.create(
|
47
|
+
{"name": "Pineapple", "is_storable": True, "tracking": "none"}
|
48
48
|
)
|
49
|
-
cls.product_lots = product_obj.create(
|
50
|
-
{"name": "Apple", "
|
49
|
+
cls.product_lots = cls.product_obj.create(
|
50
|
+
{"name": "Apple", "is_storable": True, "tracking": "lot"}
|
51
51
|
)
|
52
|
-
cls.product_package = product_obj.create(
|
53
|
-
{"name": "Orange", "
|
52
|
+
cls.product_package = cls.product_obj.create(
|
53
|
+
{"name": "Orange", "is_storable": True, "tracking": "lot"}
|
54
54
|
)
|
55
55
|
cls.lot1 = cls.env["stock.lot"].create(
|
56
56
|
{
|
@@ -73,8 +73,8 @@ class TestsCommon(common.TransactionCase):
|
|
73
73
|
"company_id": cls.company.id,
|
74
74
|
}
|
75
75
|
)
|
76
|
-
cls.product_package = product_obj.create(
|
77
|
-
{"name": "Orange", "
|
76
|
+
cls.product_package = cls.product_obj.create(
|
77
|
+
{"name": "Orange", "is_storable": True, "tracking": "lot"}
|
78
78
|
)
|
79
79
|
cls.lot4 = cls.env["stock.lot"].create(
|
80
80
|
{
|
@@ -157,12 +157,15 @@ class TestsCommon(common.TransactionCase):
|
|
157
157
|
amount,
|
158
158
|
)
|
159
159
|
|
160
|
-
def _create_wizard(
|
160
|
+
def _create_wizard(
|
161
|
+
self, origin_location, destination_location, exclude_reserved_qty=False
|
162
|
+
):
|
161
163
|
move_location_wizard = self.env["wiz.stock.move.location"]
|
162
164
|
return move_location_wizard.create(
|
163
165
|
{
|
164
166
|
"origin_location_id": origin_location.id,
|
165
167
|
"destination_location_id": destination_location.id,
|
168
|
+
"exclude_reserved_qty": exclude_reserved_qty,
|
166
169
|
}
|
167
170
|
)
|
168
171
|
|
@@ -84,20 +84,18 @@ class TestMoveLocation(TestsCommon):
|
|
84
84
|
wizard = self._create_wizard(self.internal_loc_1, self.internal_loc_2)
|
85
85
|
wizard.onchange_origin_location()
|
86
86
|
self.assertEqual(len(wizard.stock_move_location_line_ids), 7)
|
87
|
-
wizard._onchange_destination_location_id()
|
88
|
-
self.assertEqual(len(wizard.stock_move_location_line_ids), 7)
|
89
87
|
dest_location_line = wizard.stock_move_location_line_ids.mapped(
|
90
88
|
"destination_location_id"
|
91
89
|
)
|
92
90
|
self.assertEqual(dest_location_line, wizard.destination_location_id)
|
93
|
-
wizard.
|
91
|
+
wizard.clear_lines()
|
94
92
|
self.assertEqual(len(wizard.stock_move_location_line_ids), 0)
|
95
93
|
|
96
94
|
def test_wizard_onchange_origin_location(self):
|
97
95
|
"""Test a product that have existing quants with undefined quantity."""
|
98
96
|
|
99
97
|
product_not_available = self.env["product.product"].create(
|
100
|
-
{"name": "Mango", "
|
98
|
+
{"name": "Mango", "is_storable": True, "tracking": "none"}
|
101
99
|
)
|
102
100
|
self.quant_obj.create(
|
103
101
|
{
|
@@ -137,7 +135,7 @@ class TestMoveLocation(TestsCommon):
|
|
137
135
|
)
|
138
136
|
picking_lines = sorted(
|
139
137
|
[
|
140
|
-
(line.product_id.id, line.lot_id.id, line.
|
138
|
+
(line.product_id.id, line.lot_id.id, line.quantity)
|
141
139
|
for line in picking.move_line_ids
|
142
140
|
],
|
143
141
|
key=lambda x: (x[0], x[1]),
|
@@ -148,13 +146,13 @@ class TestMoveLocation(TestsCommon):
|
|
148
146
|
"Mismatch between move location lines and move lines",
|
149
147
|
)
|
150
148
|
self.assertEqual(
|
151
|
-
sorted(picking.move_line_ids.mapped("
|
149
|
+
sorted(picking.move_line_ids.mapped("quantity")),
|
152
150
|
[1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 123.0],
|
153
151
|
)
|
154
152
|
|
155
153
|
def test_planned_transfer_strict(self):
|
156
154
|
product = self.env["product.product"].create(
|
157
|
-
{"name": "Test", "
|
155
|
+
{"name": "Test", "is_storable": True, "tracking": "lot"}
|
158
156
|
)
|
159
157
|
lot = self.env["stock.lot"].create(
|
160
158
|
{
|
@@ -193,14 +191,14 @@ class TestMoveLocation(TestsCommon):
|
|
193
191
|
location_line.move_quantity,
|
194
192
|
]
|
195
193
|
line = picking.move_line_ids
|
196
|
-
picking_lines = [line.product_id.id, line.lot_id.id, line.
|
194
|
+
picking_lines = [line.product_id.id, line.lot_id.id, line.quantity]
|
197
195
|
self.assertEqual(
|
198
196
|
wizard_lines,
|
199
197
|
picking_lines,
|
200
198
|
"Mismatch between move location lines and move lines",
|
201
199
|
)
|
202
200
|
self.assertEqual(
|
203
|
-
picking.move_line_ids.
|
201
|
+
picking.move_line_ids.quantity,
|
204
202
|
10.0,
|
205
203
|
)
|
206
204
|
|
@@ -214,14 +212,10 @@ class TestMoveLocation(TestsCommon):
|
|
214
212
|
location_lines.unlink()
|
215
213
|
wizard.action_move_location()
|
216
214
|
picking = wizard.picking_id
|
217
|
-
|
218
|
-
|
219
|
-
|
220
|
-
)
|
221
|
-
self.assertEqual(
|
222
|
-
picking.move_line_ids.mapped("reserved_uom_qty"),
|
223
|
-
[0.0],
|
224
|
-
)
|
215
|
+
# Planned transfer state is "confirmed"
|
216
|
+
# move lines (quantity is zero) are removed
|
217
|
+
self.assertEqual(picking.state, "confirmed")
|
218
|
+
self.assertFalse(picking.move_line_ids)
|
225
219
|
|
226
220
|
def test_quant_transfer(self):
|
227
221
|
"""Test quants transfer."""
|
@@ -241,10 +235,8 @@ class TestMoveLocation(TestsCommon):
|
|
241
235
|
wizard.onchange_origin_location()
|
242
236
|
self.assertEqual(len(lines), 3)
|
243
237
|
wizard.destination_location_id = self.internal_loc_1
|
244
|
-
wizard._onchange_destination_location_id()
|
245
238
|
self.assertEqual(lines.mapped("destination_location_id"), self.internal_loc_1)
|
246
239
|
wizard.origin_location_id = self.internal_loc_2
|
247
|
-
wizard._onchange_destination_location_id()
|
248
240
|
self.assertEqual(len(lines), 3)
|
249
241
|
|
250
242
|
def test_readonly_location_computation(self):
|
@@ -276,7 +268,7 @@ class TestMoveLocation(TestsCommon):
|
|
276
268
|
lambda p: p.product_id == self.product_no_lots
|
277
269
|
)[0]
|
278
270
|
self.assertEqual(
|
279
|
-
putaway_line.destination_location_id,
|
271
|
+
putaway_line.destination_location_id, wizard.destination_location_id
|
280
272
|
)
|
281
273
|
picking_action = wizard.action_move_location()
|
282
274
|
picking = self.env["stock.picking"].browse(picking_action["res_id"])
|
@@ -302,6 +294,7 @@ class TestMoveLocation(TestsCommon):
|
|
302
294
|
|
303
295
|
# Create and assign a delivery picking to reserve some quantities
|
304
296
|
delivery_picking = self._create_picking(delivery_order_type)
|
297
|
+
# delivery_picking.location_id = wh_stock_shelf_1
|
305
298
|
delivery_move = self.env["stock.move"].create(
|
306
299
|
{
|
307
300
|
"name": "Delivery move",
|
@@ -315,12 +308,14 @@ class TestMoveLocation(TestsCommon):
|
|
315
308
|
)
|
316
309
|
delivery_picking.action_confirm()
|
317
310
|
self.assertEqual(delivery_picking.state, "assigned")
|
311
|
+
self.assertEqual(delivery_move.move_line_ids.location_id, wh_stock_shelf_1)
|
318
312
|
|
319
313
|
# Move all quantities to other location using module's wizard
|
320
314
|
wizard = self._create_wizard(wh_stock_shelf_1, wh_stock_shelf_2)
|
321
315
|
wizard.onchange_origin_location()
|
322
316
|
wizard.action_move_location()
|
323
|
-
self.assertEqual(delivery_picking.state, "
|
317
|
+
self.assertEqual(delivery_picking.state, "assigned")
|
318
|
+
self.assertEqual(delivery_move.move_line_ids.location_id, wh_stock_shelf_2)
|
324
319
|
|
325
320
|
# Do a planned transfer to move quantities to other location
|
326
321
|
# without using module's wizard
|
@@ -344,8 +339,8 @@ class TestMoveLocation(TestsCommon):
|
|
344
339
|
self.assertEqual(delivery_picking.state, "confirmed")
|
345
340
|
internal_picking.action_confirm()
|
346
341
|
internal_picking.action_assign()
|
347
|
-
internal_picking.move_line_ids.
|
348
|
-
internal_picking.move_line_ids.
|
342
|
+
internal_picking.move_line_ids.quantity = (
|
343
|
+
internal_picking.move_line_ids.quantity
|
349
344
|
)
|
350
345
|
internal_picking.button_validate()
|
351
346
|
self.assertEqual(internal_picking.state, "done")
|
@@ -354,5 +349,5 @@ class TestMoveLocation(TestsCommon):
|
|
354
349
|
self.assertEqual(delivery_picking.state, "assigned")
|
355
350
|
# The old reserved quantities must be in new location after confirm wizard
|
356
351
|
self.assertEqual(len(delivery_move.move_line_ids), 1)
|
357
|
-
self.assertEqual(delivery_move.move_line_ids.
|
352
|
+
self.assertEqual(delivery_move.move_line_ids.quantity, 20.0)
|
358
353
|
self.assertEqual(delivery_move.move_line_ids.location_id, wh_stock_shelf_3)
|