odoo-addon-shopfloor 16.0.2.12.0.1__py3-none-any.whl → 18.0.0.1.0.15__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/shopfloor/README.rst +79 -52
- odoo/addons/shopfloor/__manifest__.py +11 -4
- odoo/addons/shopfloor/actions/__init__.py +0 -1
- odoo/addons/shopfloor/actions/change_package_lot.py +4 -6
- odoo/addons/shopfloor/actions/data.py +7 -6
- odoo/addons/shopfloor/actions/inventory.py +1 -1
- odoo/addons/shopfloor/actions/message.py +1 -1
- odoo/addons/shopfloor/actions/move_line_search.py +1 -1
- odoo/addons/shopfloor/actions/search.py +8 -32
- odoo/addons/shopfloor/actions/stock.py +7 -6
- odoo/addons/shopfloor/i18n/ca.po +0 -5
- odoo/addons/shopfloor/i18n/de.po +0 -5
- odoo/addons/shopfloor/i18n/es_AR.po +0 -5
- odoo/addons/shopfloor/i18n/it.po +2 -8
- odoo/addons/shopfloor/i18n/pt_BR.po +0 -5
- odoo/addons/shopfloor/i18n/shopfloor.pot +7 -194
- odoo/addons/shopfloor/models/stock_location.py +5 -5
- odoo/addons/shopfloor/models/stock_move.py +24 -7
- odoo/addons/shopfloor/models/stock_move_line.py +29 -82
- odoo/addons/shopfloor/models/stock_picking.py +8 -6
- odoo/addons/shopfloor/models/stock_quant_package.py +2 -2
- odoo/addons/shopfloor/readme/CONTRIBUTORS.md +17 -0
- odoo/addons/shopfloor/readme/CREDITS.md +5 -0
- odoo/addons/shopfloor/readme/DESCRIPTION.md +37 -0
- odoo/addons/shopfloor/readme/{HISTORY.rst → HISTORY.md} +1 -2
- odoo/addons/shopfloor/readme/ROADMAP.md +10 -0
- odoo/addons/shopfloor/readme/USAGE.md +6 -0
- odoo/addons/shopfloor/services/checkout.py +9 -9
- odoo/addons/shopfloor/services/cluster_picking.py +2 -2
- odoo/addons/shopfloor/services/delivery.py +4 -6
- odoo/addons/shopfloor/services/forms/picking_form.py +4 -1
- odoo/addons/shopfloor/services/location_content_transfer.py +1 -1
- odoo/addons/shopfloor/services/single_pack_transfer.py +1 -1
- odoo/addons/shopfloor/services/zone_picking.py +5 -9
- odoo/addons/shopfloor/static/description/index.html +41 -18
- odoo/addons/shopfloor/tests/__init__.py +74 -73
- odoo/addons/shopfloor/tests/common.py +9 -9
- odoo/addons/shopfloor/tests/test_actions_change_package_lot.py +104 -71
- odoo/addons/shopfloor/tests/test_actions_data.py +17 -21
- odoo/addons/shopfloor/tests/test_actions_data_base.py +9 -3
- odoo/addons/shopfloor/tests/test_actions_data_detail.py +17 -19
- odoo/addons/shopfloor/tests/test_actions_search.py +2 -1
- odoo/addons/shopfloor/tests/test_actions_stock.py +0 -1
- odoo/addons/shopfloor/tests/test_checkout_auto_post.py +3 -3
- odoo/addons/shopfloor/tests/test_checkout_base.py +1 -1
- odoo/addons/shopfloor/tests/test_checkout_list_delivery_packaging.py +1 -1
- odoo/addons/shopfloor/tests/test_checkout_list_package.py +4 -4
- odoo/addons/shopfloor/tests/test_checkout_new_package.py +3 -3
- odoo/addons/shopfloor/tests/test_checkout_no_package.py +3 -3
- odoo/addons/shopfloor/tests/test_checkout_scan_dest_location.py +1 -1
- odoo/addons/shopfloor/tests/test_checkout_scan_package_action.py +11 -11
- odoo/addons/shopfloor/tests/test_checkout_select_package_base.py +1 -1
- odoo/addons/shopfloor/tests/test_checkout_set_qty.py +17 -17
- odoo/addons/shopfloor/tests/test_checkout_summary.py +2 -2
- odoo/addons/shopfloor/tests/test_cluster_picking_base.py +1 -1
- odoo/addons/shopfloor/tests/test_cluster_picking_batch.py +2 -2
- odoo/addons/shopfloor/tests/test_cluster_picking_change_pack_lot.py +1 -1
- odoo/addons/shopfloor/tests/test_cluster_picking_is_zero.py +1 -1
- odoo/addons/shopfloor/tests/test_cluster_picking_scan_destination.py +17 -19
- odoo/addons/shopfloor/tests/test_cluster_picking_scan_line_no_prefill_qty.py +1 -1
- odoo/addons/shopfloor/tests/test_cluster_picking_stock_issue.py +5 -5
- odoo/addons/shopfloor/tests/test_delivery_base.py +4 -6
- odoo/addons/shopfloor/tests/test_delivery_done.py +1 -1
- odoo/addons/shopfloor/tests/test_delivery_reset_qty_done_line.py +1 -1
- odoo/addons/shopfloor/tests/test_delivery_reset_qty_done_pack.py +1 -1
- odoo/addons/shopfloor/tests/test_delivery_scan_deliver.py +6 -6
- odoo/addons/shopfloor/tests/test_location_content_transfer_base.py +2 -2
- odoo/addons/shopfloor/tests/test_location_content_transfer_mix.py +8 -8
- odoo/addons/shopfloor/tests/test_location_content_transfer_set_destination_package_or_line.py +41 -41
- odoo/addons/shopfloor/tests/test_location_content_transfer_single.py +3 -3
- odoo/addons/shopfloor/tests/test_menu_base.py +4 -4
- odoo/addons/shopfloor/tests/test_move_action_assign.py +19 -4
- odoo/addons/shopfloor/tests/test_single_pack_transfer.py +3 -3
- odoo/addons/shopfloor/tests/test_stock_split.py +77 -17
- odoo/addons/shopfloor/tests/test_zone_picking_base.py +5 -5
- odoo/addons/shopfloor/tests/test_zone_picking_change_pack_lot.py +2 -2
- odoo/addons/shopfloor/tests/test_zone_picking_complete_mix_pack_flux.py +2 -2
- odoo/addons/shopfloor/tests/test_zone_picking_require_destination_package.py +3 -3
- odoo/addons/shopfloor/tests/test_zone_picking_select_line.py +4 -4
- odoo/addons/shopfloor/tests/test_zone_picking_set_line_destination.py +29 -29
- odoo/addons/shopfloor/tests/test_zone_picking_set_line_destination_package_not_allowed.py +2 -2
- odoo/addons/shopfloor/tests/test_zone_picking_set_line_destination_pick_pack.py +12 -12
- odoo/addons/shopfloor/tests/test_zone_picking_start.py +1 -1
- odoo/addons/shopfloor/tests/test_zone_picking_unload_all.py +12 -12
- odoo/addons/shopfloor/tests/test_zone_picking_unload_buffer_lines.py +4 -4
- odoo/addons/shopfloor/tests/test_zone_picking_unload_set_destination.py +10 -10
- odoo/addons/shopfloor/tests/test_zone_picking_unload_single.py +3 -3
- odoo/addons/shopfloor/views/shopfloor_menu.xml +33 -102
- odoo/addons/shopfloor/views/stock_move_line.xml +2 -2
- odoo/addons/shopfloor/views/stock_picking_type.xml +1 -1
- odoo_addon_shopfloor-18.0.0.1.0.15.dist-info/METADATA +222 -0
- {odoo_addon_shopfloor-16.0.2.12.0.1.dist-info → odoo_addon_shopfloor-18.0.0.1.0.15.dist-info}/RECORD +94 -98
- {odoo_addon_shopfloor-16.0.2.12.0.1.dist-info → odoo_addon_shopfloor-18.0.0.1.0.15.dist-info}/WHEEL +1 -1
- odoo_addon_shopfloor-18.0.0.1.0.15.dist-info/top_level.txt +1 -0
- odoo/addons/shopfloor/actions/barcode_parser.py +0 -44
- odoo/addons/shopfloor/migrations/16.0.2.0.0/post-migration.py +0 -41
- odoo/addons/shopfloor/migrations/16.0.2.4.2/post-init_search_move_line_options.py +0 -33
- odoo/addons/shopfloor/migrations/16.0.2.4.2/post-migration.py +0 -29
- odoo/addons/shopfloor/readme/CONTRIBUTORS.rst +0 -18
- odoo/addons/shopfloor/readme/CREDITS.rst +0 -5
- odoo/addons/shopfloor/readme/DESCRIPTION.rst +0 -17
- odoo/addons/shopfloor/readme/ROADMAP.rst +0 -4
- odoo/addons/shopfloor/readme/USAGE.rst +0 -6
- odoo_addon_shopfloor-16.0.2.12.0.1.dist-info/METADATA +0 -193
- odoo_addon_shopfloor-16.0.2.12.0.1.dist-info/top_level.txt +0 -1
@@ -130,7 +130,7 @@ class ZonePickingCommonCase(CommonCase):
|
|
130
130
|
.create(
|
131
131
|
{
|
132
132
|
"name": "Product E",
|
133
|
-
"
|
133
|
+
"is_storable": True,
|
134
134
|
"default_code": "E",
|
135
135
|
"barcode": "E",
|
136
136
|
"weight": 3,
|
@@ -143,7 +143,7 @@ class ZonePickingCommonCase(CommonCase):
|
|
143
143
|
.create(
|
144
144
|
{
|
145
145
|
"name": "Product F",
|
146
|
-
"
|
146
|
+
"is_storable": True,
|
147
147
|
"default_code": "F",
|
148
148
|
"barcode": "F",
|
149
149
|
"weight": 3,
|
@@ -156,7 +156,7 @@ class ZonePickingCommonCase(CommonCase):
|
|
156
156
|
.create(
|
157
157
|
{
|
158
158
|
"name": "Product G",
|
159
|
-
"
|
159
|
+
"is_storable": True,
|
160
160
|
"default_code": "G",
|
161
161
|
"barcode": "G",
|
162
162
|
"weight": 3,
|
@@ -169,7 +169,7 @@ class ZonePickingCommonCase(CommonCase):
|
|
169
169
|
.create(
|
170
170
|
{
|
171
171
|
"name": "Product H",
|
172
|
-
"
|
172
|
+
"is_storable": True,
|
173
173
|
"default_code": "H",
|
174
174
|
"barcode": "H",
|
175
175
|
"weight": 3,
|
@@ -182,7 +182,7 @@ class ZonePickingCommonCase(CommonCase):
|
|
182
182
|
.create(
|
183
183
|
{
|
184
184
|
"name": "Product I",
|
185
|
-
"
|
185
|
+
"is_storable": True,
|
186
186
|
"default_code": "I",
|
187
187
|
"barcode": "I",
|
188
188
|
"weight": 3,
|
@@ -38,7 +38,7 @@ class ZonePickingChangePackLotCase(ZonePickingCommonCase):
|
|
38
38
|
self._update_qty_in_location(
|
39
39
|
move_line.location_id,
|
40
40
|
move_line.product_id,
|
41
|
-
move_line.
|
41
|
+
move_line.quantity,
|
42
42
|
package=self.free_package,
|
43
43
|
)
|
44
44
|
# change package
|
@@ -100,7 +100,7 @@ class ZonePickingChangePackLotCase(ZonePickingCommonCase):
|
|
100
100
|
self._update_qty_in_location(
|
101
101
|
move_line.location_id,
|
102
102
|
move_line.product_id,
|
103
|
-
move_line.
|
103
|
+
move_line.quantity,
|
104
104
|
lot=self.free_lot,
|
105
105
|
)
|
106
106
|
# change lot
|
@@ -36,13 +36,13 @@ class ZonePickingCompleteMixPackageFluxCase(ZonePickingCommonCase):
|
|
36
36
|
)
|
37
37
|
# Lets move this pack somwehere...
|
38
38
|
move_line.location_dest_id = self.shelf1
|
39
|
-
|
39
|
+
quantity_reserved = move_line.quantity
|
40
40
|
response = self.service.dispatch(
|
41
41
|
"set_destination",
|
42
42
|
params={
|
43
43
|
"move_line_id": move_line.id,
|
44
44
|
"barcode": self.packing_location.barcode,
|
45
|
-
"quantity":
|
45
|
+
"quantity": quantity_reserved,
|
46
46
|
"confirmation": self.packing_location.barcode,
|
47
47
|
"handle_complete_mix_pack": True,
|
48
48
|
},
|
@@ -29,7 +29,7 @@ class ZonePickingNoPAcking(ZonePickingCommonCase):
|
|
29
29
|
params={
|
30
30
|
"move_line_id": move_line.id,
|
31
31
|
"barcode": move_line.location_dest_id.barcode,
|
32
|
-
"quantity": move_line.
|
32
|
+
"quantity": move_line.quantity,
|
33
33
|
"confirmation": None,
|
34
34
|
},
|
35
35
|
)
|
@@ -38,7 +38,7 @@ class ZonePickingNoPAcking(ZonePickingCommonCase):
|
|
38
38
|
zone_location,
|
39
39
|
picking_type,
|
40
40
|
move_line,
|
41
|
-
qty_done=move_line.
|
41
|
+
qty_done=move_line.quantity,
|
42
42
|
message=self.service.msg_store.dest_package_required(),
|
43
43
|
)
|
44
44
|
self.service.work.menu.sudo().require_destination_package = False
|
@@ -47,7 +47,7 @@ class ZonePickingNoPAcking(ZonePickingCommonCase):
|
|
47
47
|
params={
|
48
48
|
"move_line_id": move_line.id,
|
49
49
|
"barcode": move_line.location_dest_id.barcode,
|
50
|
-
"quantity": move_line.
|
50
|
+
"quantity": move_line.quantity,
|
51
51
|
"confirmation": None,
|
52
52
|
},
|
53
53
|
)
|
@@ -160,7 +160,7 @@ class ZonePickingSelectLineCase(ZonePickingCommonCase):
|
|
160
160
|
qty_done=10.0,
|
161
161
|
)
|
162
162
|
# first line done
|
163
|
-
move_line.qty_done = move_line.
|
163
|
+
move_line.qty_done = move_line.quantity
|
164
164
|
# get the next one
|
165
165
|
response = self.service.dispatch(
|
166
166
|
"scan_source",
|
@@ -625,7 +625,7 @@ class ZonePickingSelectLineCase(ZonePickingCommonCase):
|
|
625
625
|
self.service.set_destination(
|
626
626
|
move_line.id,
|
627
627
|
self.free_package.name,
|
628
|
-
move_line.
|
628
|
+
move_line.quantity,
|
629
629
|
)
|
630
630
|
self.assertEqual(move_line.shopfloor_user_id, self.env.user)
|
631
631
|
# The second user scans the same source location
|
@@ -670,7 +670,7 @@ class ZonePickingSelectLineCase(ZonePickingCommonCase):
|
|
670
670
|
params={
|
671
671
|
"move_line_id": move_line.id,
|
672
672
|
"barcode": self.free_package.name,
|
673
|
-
"quantity": move_line.
|
673
|
+
"quantity": move_line.quantity,
|
674
674
|
},
|
675
675
|
)
|
676
676
|
# unload goods
|
@@ -702,7 +702,7 @@ class ZonePickingSelectLineCase(ZonePickingCommonCase):
|
|
702
702
|
params={
|
703
703
|
"move_line_id": move_line.id,
|
704
704
|
"barcode": package_dest.name,
|
705
|
-
"quantity": move_line.
|
705
|
+
"quantity": move_line.quantity,
|
706
706
|
},
|
707
707
|
)
|
708
708
|
# unload goods
|
@@ -23,7 +23,7 @@ class ZonePickingSetLineDestinationCase(ZonePickingCommonCase):
|
|
23
23
|
params={
|
24
24
|
"move_line_id": 1234567890,
|
25
25
|
"barcode": self.packing_location.barcode,
|
26
|
-
"quantity": move_line.
|
26
|
+
"quantity": move_line.quantity,
|
27
27
|
"confirmation": None,
|
28
28
|
},
|
29
29
|
)
|
@@ -41,13 +41,13 @@ class ZonePickingSetLineDestinationCase(ZonePickingCommonCase):
|
|
41
41
|
picking_type = self.picking1.picking_type_id
|
42
42
|
move_line = self.picking1.move_line_ids
|
43
43
|
move_line.location_dest_id = self.shelf1
|
44
|
-
|
44
|
+
quantity_reserved = move_line.quantity
|
45
45
|
response = self.service.dispatch(
|
46
46
|
"set_destination",
|
47
47
|
params={
|
48
48
|
"move_line_id": move_line.id,
|
49
49
|
"barcode": self.packing_location.barcode,
|
50
|
-
"quantity":
|
50
|
+
"quantity": quantity_reserved,
|
51
51
|
"confirmation": None,
|
52
52
|
},
|
53
53
|
)
|
@@ -61,7 +61,7 @@ class ZonePickingSetLineDestinationCase(ZonePickingCommonCase):
|
|
61
61
|
move_line.location_dest_id, self.packing_location
|
62
62
|
),
|
63
63
|
confirmation_required=self.packing_location.barcode,
|
64
|
-
qty_done=
|
64
|
+
qty_done=quantity_reserved,
|
65
65
|
)
|
66
66
|
# Confirm the destination with a wrong destination (should not happen)
|
67
67
|
response = self.service.dispatch(
|
@@ -69,7 +69,7 @@ class ZonePickingSetLineDestinationCase(ZonePickingCommonCase):
|
|
69
69
|
params={
|
70
70
|
"move_line_id": move_line.id,
|
71
71
|
"barcode": self.customer_location.barcode,
|
72
|
-
"quantity": move_line.
|
72
|
+
"quantity": move_line.quantity,
|
73
73
|
"confirmation": self.packing_location.barcode,
|
74
74
|
},
|
75
75
|
)
|
@@ -80,7 +80,7 @@ class ZonePickingSetLineDestinationCase(ZonePickingCommonCase):
|
|
80
80
|
picking_type,
|
81
81
|
move_line,
|
82
82
|
message=self.service.msg_store.dest_location_not_allowed(),
|
83
|
-
qty_done=
|
83
|
+
qty_done=quantity_reserved,
|
84
84
|
)
|
85
85
|
# Confirm the destination with the right destination this time
|
86
86
|
response = self.service.dispatch(
|
@@ -88,7 +88,7 @@ class ZonePickingSetLineDestinationCase(ZonePickingCommonCase):
|
|
88
88
|
params={
|
89
89
|
"move_line_id": move_line.id,
|
90
90
|
"barcode": self.packing_location.barcode,
|
91
|
-
"quantity": move_line.
|
91
|
+
"quantity": move_line.quantity,
|
92
92
|
"confirmation": self.packing_location.barcode,
|
93
93
|
},
|
94
94
|
)
|
@@ -111,13 +111,13 @@ class ZonePickingSetLineDestinationCase(ZonePickingCommonCase):
|
|
111
111
|
move_line = self.picking1.move_line_ids
|
112
112
|
move_line.move_id.location_dest_id = self.packing_sublocation_a
|
113
113
|
move_line.picking_id.location_dest_id = self.packing_sublocation_a
|
114
|
-
|
114
|
+
quantity_reserved = move_line.quantity
|
115
115
|
response = self.service.dispatch(
|
116
116
|
"set_destination",
|
117
117
|
params={
|
118
118
|
"move_line_id": move_line.id,
|
119
119
|
"barcode": self.packing_sublocation_b.barcode,
|
120
|
-
"quantity":
|
120
|
+
"quantity": quantity_reserved,
|
121
121
|
"confirmation": self.packing_sublocation_b.barcode,
|
122
122
|
},
|
123
123
|
)
|
@@ -128,7 +128,7 @@ class ZonePickingSetLineDestinationCase(ZonePickingCommonCase):
|
|
128
128
|
picking_type,
|
129
129
|
move_line,
|
130
130
|
message=self.service.msg_store.dest_location_not_allowed(),
|
131
|
-
qty_done=
|
131
|
+
qty_done=quantity_reserved,
|
132
132
|
)
|
133
133
|
|
134
134
|
def test_set_destination_location_no_other_move_line_full_qty(self):
|
@@ -157,7 +157,7 @@ class ZonePickingSetLineDestinationCase(ZonePickingCommonCase):
|
|
157
157
|
params={
|
158
158
|
"move_line_id": move_line.id,
|
159
159
|
"barcode": self.packing_location.barcode,
|
160
|
-
"quantity": move_line.
|
160
|
+
"quantity": move_line.quantity,
|
161
161
|
"confirmation": None,
|
162
162
|
},
|
163
163
|
)
|
@@ -259,7 +259,7 @@ class ZonePickingSetLineDestinationCase(ZonePickingCommonCase):
|
|
259
259
|
params={
|
260
260
|
"move_line_id": move_line.id,
|
261
261
|
"barcode": self.packing_location.barcode,
|
262
|
-
"quantity": move_line.
|
262
|
+
"quantity": move_line.quantity, # 6 qty
|
263
263
|
"confirmation": None,
|
264
264
|
},
|
265
265
|
)
|
@@ -273,10 +273,10 @@ class ZonePickingSetLineDestinationCase(ZonePickingCommonCase):
|
|
273
273
|
self.assertEqual(len(move_after), 1)
|
274
274
|
self.assertEqual(move_line.move_id.product_uom_qty, 6)
|
275
275
|
self.assertEqual(move_line.move_id.state, "done")
|
276
|
-
self.assertEqual(move_line.move_id.move_line_ids.
|
276
|
+
self.assertEqual(move_line.move_id.move_line_ids.quantity, 0)
|
277
277
|
self.assertEqual(move_after.product_uom_qty, 4)
|
278
278
|
self.assertEqual(move_after.state, "assigned")
|
279
|
-
self.assertEqual(move_after.move_line_ids.
|
279
|
+
self.assertEqual(move_after.move_line_ids.quantity, 4)
|
280
280
|
self.assertEqual(move_line.qty_done, 6)
|
281
281
|
self.assertNotEqual(move_line.move_id, other_move_line.move_id)
|
282
282
|
# Check response
|
@@ -360,7 +360,7 @@ class ZonePickingSetLineDestinationCase(ZonePickingCommonCase):
|
|
360
360
|
params={
|
361
361
|
"move_line_id": move_line.id,
|
362
362
|
"barcode": self.packing_location.barcode,
|
363
|
-
"quantity": move_line.
|
363
|
+
"quantity": move_line.quantity,
|
364
364
|
"confirmation": None,
|
365
365
|
},
|
366
366
|
)
|
@@ -394,7 +394,7 @@ class ZonePickingSetLineDestinationCase(ZonePickingCommonCase):
|
|
394
394
|
params={
|
395
395
|
"move_line_id": move_line.id,
|
396
396
|
"barcode": self.free_package.name,
|
397
|
-
"quantity": move_line.
|
397
|
+
"quantity": move_line.quantity,
|
398
398
|
"confirmation": None,
|
399
399
|
},
|
400
400
|
)
|
@@ -406,7 +406,7 @@ class ZonePickingSetLineDestinationCase(ZonePickingCommonCase):
|
|
406
406
|
[
|
407
407
|
{
|
408
408
|
"result_package_id": self.free_package.id,
|
409
|
-
"
|
409
|
+
"quantity": 10,
|
410
410
|
"qty_done": 10,
|
411
411
|
"shopfloor_user_id": self.env.user.id,
|
412
412
|
},
|
@@ -464,7 +464,7 @@ class ZonePickingSetLineDestinationCase(ZonePickingCommonCase):
|
|
464
464
|
[
|
465
465
|
{
|
466
466
|
"result_package_id": self.free_package.id,
|
467
|
-
"
|
467
|
+
"quantity": 6,
|
468
468
|
"qty_done": 6,
|
469
469
|
"shopfloor_user_id": self.env.user.id,
|
470
470
|
},
|
@@ -475,7 +475,7 @@ class ZonePickingSetLineDestinationCase(ZonePickingCommonCase):
|
|
475
475
|
[
|
476
476
|
{
|
477
477
|
"result_package_id": new_move_line.package_id.id, # Unchanged
|
478
|
-
"
|
478
|
+
"quantity": 4,
|
479
479
|
"qty_done": 0,
|
480
480
|
"shopfloor_user_id": False,
|
481
481
|
},
|
@@ -510,7 +510,7 @@ class ZonePickingSetLineDestinationCase(ZonePickingCommonCase):
|
|
510
510
|
params={
|
511
511
|
"move_line_id": move_line.id,
|
512
512
|
"barcode": self.free_package.name,
|
513
|
-
"quantity": move_line.
|
513
|
+
"quantity": move_line.quantity,
|
514
514
|
"confirmation": None,
|
515
515
|
},
|
516
516
|
)
|
@@ -537,7 +537,7 @@ class ZonePickingSetLineDestinationCase(ZonePickingCommonCase):
|
|
537
537
|
params={
|
538
538
|
"move_line_id": move_line.id,
|
539
539
|
"barcode": self.free_package.name,
|
540
|
-
"quantity": move_line.
|
540
|
+
"quantity": move_line.quantity,
|
541
541
|
"confirmation": None,
|
542
542
|
},
|
543
543
|
)
|
@@ -559,7 +559,7 @@ class ZonePickingSetLineDestinationCase(ZonePickingCommonCase):
|
|
559
559
|
params={
|
560
560
|
"move_line_id": move_line.id,
|
561
561
|
"barcode": self.free_package.name,
|
562
|
-
"quantity": move_line.
|
562
|
+
"quantity": move_line.quantity,
|
563
563
|
"confirmation": None,
|
564
564
|
},
|
565
565
|
)
|
@@ -582,7 +582,7 @@ class ZonePickingSetLineDestinationCase(ZonePickingCommonCase):
|
|
582
582
|
params={
|
583
583
|
"move_line_id": move_line.id,
|
584
584
|
"barcode": self.free_package.name,
|
585
|
-
"quantity": move_line.
|
585
|
+
"quantity": move_line.quantity,
|
586
586
|
"confirmation": None,
|
587
587
|
},
|
588
588
|
)
|
@@ -619,7 +619,7 @@ class ZonePickingSetLineDestinationCase(ZonePickingCommonCase):
|
|
619
619
|
params={
|
620
620
|
"move_line_id": move_line.id,
|
621
621
|
"barcode": self.free_package.name,
|
622
|
-
"quantity": move_line.
|
622
|
+
"quantity": move_line.quantity,
|
623
623
|
"confirmation": None,
|
624
624
|
},
|
625
625
|
)
|
@@ -656,7 +656,7 @@ class ZonePickingSetLineDestinationCase(ZonePickingCommonCase):
|
|
656
656
|
picking_type,
|
657
657
|
move_line,
|
658
658
|
message=self.service.msg_store.picking_zero_quantity(),
|
659
|
-
qty_done=move_line.
|
659
|
+
qty_done=move_line.quantity,
|
660
660
|
)
|
661
661
|
|
662
662
|
def test_set_destination_package_error_concurent_work(self):
|
@@ -675,7 +675,7 @@ class ZonePickingSetLineDestinationCase(ZonePickingCommonCase):
|
|
675
675
|
params={
|
676
676
|
"move_line_id": move_line.id,
|
677
677
|
"barcode": self.free_package.name,
|
678
|
-
"quantity": move_line.
|
678
|
+
"quantity": move_line.quantity,
|
679
679
|
"confirmation": None,
|
680
680
|
},
|
681
681
|
)
|
@@ -689,7 +689,7 @@ class ZonePickingSetLineDestinationCase(ZonePickingCommonCase):
|
|
689
689
|
"message_type": "error",
|
690
690
|
"body": "Someone is already working on these transfers",
|
691
691
|
},
|
692
|
-
qty_done=move_line.
|
692
|
+
qty_done=move_line.quantity,
|
693
693
|
)
|
694
694
|
|
695
695
|
def test_set_destination_location_error_concurent_work(self):
|
@@ -709,7 +709,7 @@ class ZonePickingSetLineDestinationCase(ZonePickingCommonCase):
|
|
709
709
|
"move_line_id": move_line.id,
|
710
710
|
"package_id": self.free_package.id,
|
711
711
|
"barcode": self.packing_location.barcode,
|
712
|
-
"quantity": move_line.
|
712
|
+
"quantity": move_line.quantity,
|
713
713
|
"confirmation": None,
|
714
714
|
},
|
715
715
|
)
|
@@ -723,5 +723,5 @@ class ZonePickingSetLineDestinationCase(ZonePickingCommonCase):
|
|
723
723
|
"message_type": "error",
|
724
724
|
"body": "Someone is already working on these transfers",
|
725
725
|
},
|
726
|
-
qty_done=move_line.
|
726
|
+
qty_done=move_line.quantity,
|
727
727
|
)
|
@@ -29,7 +29,7 @@ class ZonePickingSetLineDestinationPackageNotAllowedCase(ZonePickingCommonCase):
|
|
29
29
|
params={
|
30
30
|
"move_line_id": move_line.id,
|
31
31
|
"barcode": self.free_package.name,
|
32
|
-
"quantity": move_line.
|
32
|
+
"quantity": move_line.quantity,
|
33
33
|
"confirmation": None,
|
34
34
|
},
|
35
35
|
)
|
@@ -79,7 +79,7 @@ class ZonePickingSetLineDestinationPackageNotAllowedCase(ZonePickingCommonCase):
|
|
79
79
|
params={
|
80
80
|
"move_line_id": move_line.id,
|
81
81
|
"barcode": self.packing_location.barcode,
|
82
|
-
"quantity": move_line.
|
82
|
+
"quantity": move_line.quantity,
|
83
83
|
"confirmation": None,
|
84
84
|
},
|
85
85
|
)
|
@@ -67,7 +67,7 @@ class ZonePickingSetLineDestinationPickPackCase(ZonePickingCommonCase):
|
|
67
67
|
picking_type = self.picking1.picking_type_id
|
68
68
|
move_line = self.picking1.move_line_ids
|
69
69
|
move_line.location_dest_id = self.shelf1
|
70
|
-
|
70
|
+
quantity_reserved = move_line.quantity
|
71
71
|
previous_qty_done = move_line.qty_done
|
72
72
|
# Confirm the destination with the right destination
|
73
73
|
response = self.service.dispatch(
|
@@ -75,7 +75,7 @@ class ZonePickingSetLineDestinationPickPackCase(ZonePickingCommonCase):
|
|
75
75
|
params={
|
76
76
|
"move_line_id": move_line.id,
|
77
77
|
"barcode": self.packing_location.barcode,
|
78
|
-
"quantity":
|
78
|
+
"quantity": quantity_reserved,
|
79
79
|
},
|
80
80
|
)
|
81
81
|
self.assertEqual(move_line.qty_done, previous_qty_done)
|
@@ -87,7 +87,7 @@ class ZonePickingSetLineDestinationPickPackCase(ZonePickingCommonCase):
|
|
87
87
|
message=self.service.msg_store.picking_without_carrier_cannot_pack(
|
88
88
|
move_line.picking_id
|
89
89
|
),
|
90
|
-
qty_done=
|
90
|
+
qty_done=quantity_reserved,
|
91
91
|
)
|
92
92
|
|
93
93
|
def test_set_destination_location_ok_carrier(self):
|
@@ -103,7 +103,7 @@ class ZonePickingSetLineDestinationPickPackCase(ZonePickingCommonCase):
|
|
103
103
|
params={
|
104
104
|
"move_line_id": move_line.id,
|
105
105
|
"barcode": self.packing_location.barcode,
|
106
|
-
"quantity": move_line.
|
106
|
+
"quantity": move_line.quantity,
|
107
107
|
"confirmation": self.packing_location.barcode,
|
108
108
|
},
|
109
109
|
)
|
@@ -133,13 +133,13 @@ class ZonePickingSetLineDestinationPickPackCase(ZonePickingCommonCase):
|
|
133
133
|
self.assertEqual(len(moves_before), 1)
|
134
134
|
self.assertEqual(len(moves_before.move_line_ids), 1)
|
135
135
|
move_line = moves_before.move_line_ids
|
136
|
-
|
136
|
+
quantity_reserved = move_line.quantity
|
137
137
|
response = self.service.dispatch(
|
138
138
|
"set_destination",
|
139
139
|
params={
|
140
140
|
"move_line_id": move_line.id,
|
141
141
|
"barcode": self.free_package.name,
|
142
|
-
"quantity":
|
142
|
+
"quantity": quantity_reserved,
|
143
143
|
},
|
144
144
|
)
|
145
145
|
self.assert_response_set_line_destination(
|
@@ -150,7 +150,7 @@ class ZonePickingSetLineDestinationPickPackCase(ZonePickingCommonCase):
|
|
150
150
|
message=self.service.msg_store.picking_without_carrier_cannot_pack(
|
151
151
|
move_line.picking_id
|
152
152
|
),
|
153
|
-
qty_done=
|
153
|
+
qty_done=quantity_reserved,
|
154
154
|
)
|
155
155
|
|
156
156
|
def test_set_destination_package_full_qty_ok_carrier_bad_package(self):
|
@@ -162,13 +162,13 @@ class ZonePickingSetLineDestinationPickPackCase(ZonePickingCommonCase):
|
|
162
162
|
self.assertEqual(len(moves_before.move_line_ids), 1)
|
163
163
|
move_line = moves_before.move_line_ids
|
164
164
|
move_line.picking_id.carrier_id = self.carrier
|
165
|
-
|
165
|
+
quantity_reserved = move_line.quantity
|
166
166
|
response = self.service.dispatch(
|
167
167
|
"set_destination",
|
168
168
|
params={
|
169
169
|
"move_line_id": move_line.id,
|
170
170
|
"barcode": self.free_package.name,
|
171
|
-
"quantity":
|
171
|
+
"quantity": quantity_reserved,
|
172
172
|
},
|
173
173
|
)
|
174
174
|
self.assert_response_set_line_destination(
|
@@ -179,7 +179,7 @@ class ZonePickingSetLineDestinationPickPackCase(ZonePickingCommonCase):
|
|
179
179
|
message=self.service.msg_store.packaging_invalid_for_carrier(
|
180
180
|
self.free_package.product_packaging_id, self.carrier
|
181
181
|
),
|
182
|
-
qty_done=
|
182
|
+
qty_done=quantity_reserved,
|
183
183
|
)
|
184
184
|
|
185
185
|
def test_set_destination_package_full_qty_ok_carrier_ok_package(self):
|
@@ -208,7 +208,7 @@ class ZonePickingSetLineDestinationPickPackCase(ZonePickingCommonCase):
|
|
208
208
|
params={
|
209
209
|
"move_line_id": move_line.id,
|
210
210
|
"barcode": self.free_package.name,
|
211
|
-
"quantity": move_line.
|
211
|
+
"quantity": move_line.quantity,
|
212
212
|
},
|
213
213
|
)
|
214
214
|
# Check picking data
|
@@ -219,7 +219,7 @@ class ZonePickingSetLineDestinationPickPackCase(ZonePickingCommonCase):
|
|
219
219
|
[
|
220
220
|
{
|
221
221
|
"result_package_id": self.free_package.id,
|
222
|
-
"
|
222
|
+
"quantity": 10,
|
223
223
|
"qty_done": 10,
|
224
224
|
"shopfloor_user_id": self.env.user.id,
|
225
225
|
},
|
@@ -138,7 +138,7 @@ class ZonePickingStartCase(ZonePickingCommonCase):
|
|
138
138
|
# and set the destination package
|
139
139
|
self.service._set_destination_package(
|
140
140
|
move_line,
|
141
|
-
move_line.
|
141
|
+
move_line.quantity,
|
142
142
|
self.free_package,
|
143
143
|
)
|
144
144
|
response = self.service.dispatch("select_zone")
|
@@ -29,12 +29,12 @@ class ZonePickingUnloadAllCase(ZonePickingCommonCase):
|
|
29
29
|
# set the destination package on lines
|
30
30
|
self.service._set_destination_package(
|
31
31
|
move_line1,
|
32
|
-
move_line1.
|
32
|
+
move_line1.quantity,
|
33
33
|
self.free_package,
|
34
34
|
)
|
35
35
|
self.service._set_destination_package(
|
36
36
|
move_line2,
|
37
|
-
move_line2.
|
37
|
+
move_line2.quantity,
|
38
38
|
another_package,
|
39
39
|
)
|
40
40
|
# set destination location for all lines in the buffer
|
@@ -85,12 +85,12 @@ class ZonePickingUnloadAllCase(ZonePickingCommonCase):
|
|
85
85
|
# set the destination package on lines
|
86
86
|
self.service._set_destination_package(
|
87
87
|
move_line1,
|
88
|
-
move_line1.
|
88
|
+
move_line1.quantity,
|
89
89
|
self.free_package,
|
90
90
|
)
|
91
91
|
self.service._set_destination_package(
|
92
92
|
move_line2,
|
93
|
-
move_line2.
|
93
|
+
move_line2.quantity,
|
94
94
|
another_package,
|
95
95
|
)
|
96
96
|
# set an allowed destination location (inside the picking type default
|
@@ -144,12 +144,12 @@ class ZonePickingUnloadAllCase(ZonePickingCommonCase):
|
|
144
144
|
# set the destination package on lines
|
145
145
|
self.service._set_destination_package(
|
146
146
|
move_line1,
|
147
|
-
move_line1.
|
147
|
+
move_line1.quantity,
|
148
148
|
self.free_package,
|
149
149
|
)
|
150
150
|
self.service._set_destination_package(
|
151
151
|
move_line2,
|
152
|
-
move_line2.
|
152
|
+
move_line2.quantity,
|
153
153
|
another_package,
|
154
154
|
)
|
155
155
|
# set destination location for all lines in the buffer
|
@@ -191,12 +191,12 @@ class ZonePickingUnloadAllCase(ZonePickingCommonCase):
|
|
191
191
|
# set the destination package on lines
|
192
192
|
self.service._set_destination_package(
|
193
193
|
move_line_g,
|
194
|
-
move_line_g.
|
194
|
+
move_line_g.quantity,
|
195
195
|
self.free_package,
|
196
196
|
)
|
197
197
|
self.service._set_destination_package(
|
198
198
|
move_line_h,
|
199
|
-
move_line_h.
|
199
|
+
move_line_h.quantity,
|
200
200
|
another_package, # partial qty
|
201
201
|
)
|
202
202
|
# set destination location for all lines in the buffer
|
@@ -239,7 +239,7 @@ class ZonePickingUnloadAllCase(ZonePickingCommonCase):
|
|
239
239
|
# set the destination package on lines
|
240
240
|
self.service._set_destination_package(
|
241
241
|
move_line,
|
242
|
-
move_line.
|
242
|
+
move_line.quantity,
|
243
243
|
self.free_package,
|
244
244
|
)
|
245
245
|
response = self.service.dispatch(
|
@@ -263,7 +263,7 @@ class ZonePickingUnloadAllCase(ZonePickingCommonCase):
|
|
263
263
|
# set the destination package on lines
|
264
264
|
self.service._set_destination_package(
|
265
265
|
move_line,
|
266
|
-
move_line.
|
266
|
+
move_line.quantity,
|
267
267
|
self.free_package,
|
268
268
|
)
|
269
269
|
response = self.service.dispatch(
|
@@ -304,7 +304,7 @@ class ZonePickingUnloadAllCase(ZonePickingCommonCase):
|
|
304
304
|
# put one line in the buffer
|
305
305
|
self.service._set_destination_package(
|
306
306
|
move_line,
|
307
|
-
move_line.
|
307
|
+
move_line.quantity,
|
308
308
|
self.free_package,
|
309
309
|
)
|
310
310
|
response = self.service.dispatch(
|
@@ -335,7 +335,7 @@ class ZonePickingUnloadAllCase(ZonePickingCommonCase):
|
|
335
335
|
):
|
336
336
|
self.service._set_destination_package(
|
337
337
|
move_line,
|
338
|
-
move_line.
|
338
|
+
move_line.quantity,
|
339
339
|
package_dest,
|
340
340
|
)
|
341
341
|
response = self.service.dispatch(
|
@@ -35,7 +35,7 @@ class ZonePickingUnloadBufferLinesCase(ZonePickingCommonCase):
|
|
35
35
|
)
|
36
36
|
self.service._set_destination_package(
|
37
37
|
line,
|
38
|
-
line.
|
38
|
+
line.quantity,
|
39
39
|
dest_package,
|
40
40
|
)
|
41
41
|
|
@@ -61,7 +61,7 @@ class ZonePickingUnloadBufferLinesCase(ZonePickingCommonCase):
|
|
61
61
|
)
|
62
62
|
self.service._set_destination_package(
|
63
63
|
line,
|
64
|
-
line.
|
64
|
+
line.quantity,
|
65
65
|
dest_package,
|
66
66
|
)
|
67
67
|
|
@@ -89,7 +89,7 @@ class ZonePickingUnloadBufferLinesCase(ZonePickingCommonCase):
|
|
89
89
|
)
|
90
90
|
self.service._set_destination_package(
|
91
91
|
line,
|
92
|
-
line.
|
92
|
+
line.quantity,
|
93
93
|
dest_package,
|
94
94
|
)
|
95
95
|
# Simulate line from picking1 processed by another user
|
@@ -99,7 +99,7 @@ class ZonePickingUnloadBufferLinesCase(ZonePickingCommonCase):
|
|
99
99
|
)
|
100
100
|
self.service._actions_for("stock").mark_move_line_as_picked(
|
101
101
|
line,
|
102
|
-
line.
|
102
|
+
line.quantity,
|
103
103
|
dest_package,
|
104
104
|
user=self.env.ref("base.user_admin"),
|
105
105
|
)
|