odoo-addon-shopfloor 16.0.2.12.0__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.
Files changed (105) hide show
  1. odoo/addons/shopfloor/README.rst +79 -52
  2. odoo/addons/shopfloor/__manifest__.py +11 -4
  3. odoo/addons/shopfloor/actions/__init__.py +0 -1
  4. odoo/addons/shopfloor/actions/change_package_lot.py +4 -6
  5. odoo/addons/shopfloor/actions/data.py +7 -6
  6. odoo/addons/shopfloor/actions/inventory.py +1 -1
  7. odoo/addons/shopfloor/actions/message.py +1 -1
  8. odoo/addons/shopfloor/actions/move_line_search.py +1 -1
  9. odoo/addons/shopfloor/actions/search.py +8 -32
  10. odoo/addons/shopfloor/actions/stock.py +7 -6
  11. odoo/addons/shopfloor/i18n/ca.po +0 -5
  12. odoo/addons/shopfloor/i18n/de.po +0 -5
  13. odoo/addons/shopfloor/i18n/es_AR.po +0 -5
  14. odoo/addons/shopfloor/i18n/it.po +2 -8
  15. odoo/addons/shopfloor/i18n/pt_BR.po +0 -5
  16. odoo/addons/shopfloor/i18n/shopfloor.pot +7 -194
  17. odoo/addons/shopfloor/models/stock_location.py +5 -5
  18. odoo/addons/shopfloor/models/stock_move.py +24 -7
  19. odoo/addons/shopfloor/models/stock_move_line.py +29 -82
  20. odoo/addons/shopfloor/models/stock_picking.py +8 -6
  21. odoo/addons/shopfloor/models/stock_quant_package.py +2 -2
  22. odoo/addons/shopfloor/readme/CONTRIBUTORS.md +17 -0
  23. odoo/addons/shopfloor/readme/CREDITS.md +5 -0
  24. odoo/addons/shopfloor/readme/DESCRIPTION.md +37 -0
  25. odoo/addons/shopfloor/readme/{HISTORY.rst → HISTORY.md} +1 -2
  26. odoo/addons/shopfloor/readme/ROADMAP.md +10 -0
  27. odoo/addons/shopfloor/readme/USAGE.md +6 -0
  28. odoo/addons/shopfloor/services/checkout.py +9 -9
  29. odoo/addons/shopfloor/services/cluster_picking.py +2 -2
  30. odoo/addons/shopfloor/services/delivery.py +4 -6
  31. odoo/addons/shopfloor/services/forms/picking_form.py +4 -1
  32. odoo/addons/shopfloor/services/location_content_transfer.py +1 -1
  33. odoo/addons/shopfloor/services/single_pack_transfer.py +1 -1
  34. odoo/addons/shopfloor/services/zone_picking.py +5 -9
  35. odoo/addons/shopfloor/static/description/index.html +41 -18
  36. odoo/addons/shopfloor/tests/__init__.py +74 -73
  37. odoo/addons/shopfloor/tests/common.py +9 -9
  38. odoo/addons/shopfloor/tests/test_actions_change_package_lot.py +104 -71
  39. odoo/addons/shopfloor/tests/test_actions_data.py +17 -21
  40. odoo/addons/shopfloor/tests/test_actions_data_base.py +9 -3
  41. odoo/addons/shopfloor/tests/test_actions_data_detail.py +17 -19
  42. odoo/addons/shopfloor/tests/test_actions_search.py +2 -1
  43. odoo/addons/shopfloor/tests/test_actions_stock.py +0 -1
  44. odoo/addons/shopfloor/tests/test_checkout_auto_post.py +3 -3
  45. odoo/addons/shopfloor/tests/test_checkout_base.py +1 -1
  46. odoo/addons/shopfloor/tests/test_checkout_list_delivery_packaging.py +1 -1
  47. odoo/addons/shopfloor/tests/test_checkout_list_package.py +4 -4
  48. odoo/addons/shopfloor/tests/test_checkout_new_package.py +3 -3
  49. odoo/addons/shopfloor/tests/test_checkout_no_package.py +3 -3
  50. odoo/addons/shopfloor/tests/test_checkout_scan_dest_location.py +1 -1
  51. odoo/addons/shopfloor/tests/test_checkout_scan_package_action.py +11 -11
  52. odoo/addons/shopfloor/tests/test_checkout_select_package_base.py +1 -1
  53. odoo/addons/shopfloor/tests/test_checkout_set_qty.py +17 -17
  54. odoo/addons/shopfloor/tests/test_checkout_summary.py +2 -2
  55. odoo/addons/shopfloor/tests/test_cluster_picking_base.py +1 -1
  56. odoo/addons/shopfloor/tests/test_cluster_picking_batch.py +2 -2
  57. odoo/addons/shopfloor/tests/test_cluster_picking_change_pack_lot.py +1 -1
  58. odoo/addons/shopfloor/tests/test_cluster_picking_is_zero.py +1 -1
  59. odoo/addons/shopfloor/tests/test_cluster_picking_scan_destination.py +17 -19
  60. odoo/addons/shopfloor/tests/test_cluster_picking_scan_line_no_prefill_qty.py +1 -1
  61. odoo/addons/shopfloor/tests/test_cluster_picking_stock_issue.py +5 -5
  62. odoo/addons/shopfloor/tests/test_delivery_base.py +4 -6
  63. odoo/addons/shopfloor/tests/test_delivery_done.py +1 -1
  64. odoo/addons/shopfloor/tests/test_delivery_reset_qty_done_line.py +1 -1
  65. odoo/addons/shopfloor/tests/test_delivery_reset_qty_done_pack.py +1 -1
  66. odoo/addons/shopfloor/tests/test_delivery_scan_deliver.py +6 -6
  67. odoo/addons/shopfloor/tests/test_location_content_transfer_base.py +2 -2
  68. odoo/addons/shopfloor/tests/test_location_content_transfer_mix.py +8 -8
  69. odoo/addons/shopfloor/tests/test_location_content_transfer_set_destination_package_or_line.py +41 -41
  70. odoo/addons/shopfloor/tests/test_location_content_transfer_single.py +3 -3
  71. odoo/addons/shopfloor/tests/test_menu_base.py +4 -4
  72. odoo/addons/shopfloor/tests/test_move_action_assign.py +19 -4
  73. odoo/addons/shopfloor/tests/test_single_pack_transfer.py +3 -3
  74. odoo/addons/shopfloor/tests/test_stock_split.py +77 -17
  75. odoo/addons/shopfloor/tests/test_zone_picking_base.py +5 -5
  76. odoo/addons/shopfloor/tests/test_zone_picking_change_pack_lot.py +2 -2
  77. odoo/addons/shopfloor/tests/test_zone_picking_complete_mix_pack_flux.py +2 -2
  78. odoo/addons/shopfloor/tests/test_zone_picking_require_destination_package.py +3 -3
  79. odoo/addons/shopfloor/tests/test_zone_picking_select_line.py +4 -4
  80. odoo/addons/shopfloor/tests/test_zone_picking_set_line_destination.py +29 -29
  81. odoo/addons/shopfloor/tests/test_zone_picking_set_line_destination_package_not_allowed.py +2 -2
  82. odoo/addons/shopfloor/tests/test_zone_picking_set_line_destination_pick_pack.py +12 -12
  83. odoo/addons/shopfloor/tests/test_zone_picking_start.py +1 -1
  84. odoo/addons/shopfloor/tests/test_zone_picking_unload_all.py +12 -12
  85. odoo/addons/shopfloor/tests/test_zone_picking_unload_buffer_lines.py +4 -4
  86. odoo/addons/shopfloor/tests/test_zone_picking_unload_set_destination.py +10 -10
  87. odoo/addons/shopfloor/tests/test_zone_picking_unload_single.py +3 -3
  88. odoo/addons/shopfloor/views/shopfloor_menu.xml +33 -102
  89. odoo/addons/shopfloor/views/stock_move_line.xml +2 -2
  90. odoo/addons/shopfloor/views/stock_picking_type.xml +1 -1
  91. odoo_addon_shopfloor-18.0.0.1.0.15.dist-info/METADATA +222 -0
  92. {odoo_addon_shopfloor-16.0.2.12.0.dist-info → odoo_addon_shopfloor-18.0.0.1.0.15.dist-info}/RECORD +94 -98
  93. {odoo_addon_shopfloor-16.0.2.12.0.dist-info → odoo_addon_shopfloor-18.0.0.1.0.15.dist-info}/WHEEL +1 -1
  94. odoo_addon_shopfloor-18.0.0.1.0.15.dist-info/top_level.txt +1 -0
  95. odoo/addons/shopfloor/actions/barcode_parser.py +0 -44
  96. odoo/addons/shopfloor/migrations/16.0.2.0.0/post-migration.py +0 -41
  97. odoo/addons/shopfloor/migrations/16.0.2.4.2/post-init_search_move_line_options.py +0 -33
  98. odoo/addons/shopfloor/migrations/16.0.2.4.2/post-migration.py +0 -29
  99. odoo/addons/shopfloor/readme/CONTRIBUTORS.rst +0 -18
  100. odoo/addons/shopfloor/readme/CREDITS.rst +0 -5
  101. odoo/addons/shopfloor/readme/DESCRIPTION.rst +0 -17
  102. odoo/addons/shopfloor/readme/ROADMAP.rst +0 -4
  103. odoo/addons/shopfloor/readme/USAGE.rst +0 -6
  104. odoo_addon_shopfloor-16.0.2.12.0.dist-info/METADATA +0 -193
  105. odoo_addon_shopfloor-16.0.2.12.0.dist-info/top_level.txt +0 -1
@@ -45,7 +45,7 @@ class ClusterPickingScanDestinationPackCase(ClusterPickingCommonCase):
45
45
  """
46
46
  line = self.batch.picking_ids.move_line_ids[0]
47
47
  next_line = self.batch.picking_ids.move_line_ids[1]
48
- qty_done = line.reserved_uom_qty
48
+ qty_done = line.quantity
49
49
  response = self.service.dispatch(
50
50
  "scan_destination_pack",
51
51
  params={
@@ -79,7 +79,7 @@ class ClusterPickingScanDestinationPackCase(ClusterPickingCommonCase):
79
79
  )
80
80
  # this is the only remaining line to pick
81
81
  line = self.two_lines_picking.move_line_ids[1]
82
- qty_done = line.reserved_uom_qty
82
+ qty_done = line.quantity
83
83
  response = self.service.dispatch(
84
84
  "scan_destination_pack",
85
85
  params={
@@ -113,7 +113,7 @@ class ClusterPickingScanDestinationPackCase(ClusterPickingCommonCase):
113
113
  "move_line_id": line2.id,
114
114
  # this bin is used for the same picking, should be allowed
115
115
  "barcode": self.bin1.name,
116
- "quantity": line2.reserved_uom_qty,
116
+ "quantity": line2.quantity,
117
117
  },
118
118
  )
119
119
  self.assert_response(
@@ -137,7 +137,7 @@ class ClusterPickingScanDestinationPackCase(ClusterPickingCommonCase):
137
137
  "move_line_id": line.id,
138
138
  # this bin is used for the other picking
139
139
  "barcode": self.bin1.name,
140
- "quantity": line.reserved_uom_qty,
140
+ "quantity": line.quantity,
141
141
  },
142
142
  )
143
143
  self.assertRecordValues(line, [{"qty_done": 0, "result_package_id": False}])
@@ -168,7 +168,7 @@ class ClusterPickingScanDestinationPackCase(ClusterPickingCommonCase):
168
168
  "move_line_id": line.id,
169
169
  # this bin is used for the other picking
170
170
  "barcode": self.bin1.name,
171
- "quantity": line.reserved_uom_qty,
171
+ "quantity": line.quantity,
172
172
  },
173
173
  )
174
174
  # Since `multiple_move_single_pack` is enabled, assigning `bin` should be ok
@@ -179,13 +179,13 @@ class ClusterPickingScanDestinationPackCase(ClusterPickingCommonCase):
179
179
  {
180
180
  "qty_done": 10,
181
181
  "result_package_id": self.bin1.id,
182
- "reserved_uom_qty": 10,
182
+ "quantity": 10,
183
183
  }
184
184
  ],
185
185
  )
186
186
  self.assertRecordValues(
187
187
  new_line,
188
- [{"qty_done": 0, "result_package_id": False, "reserved_uom_qty": 10}],
188
+ [{"qty_done": 0, "result_package_id": False, "quantity": 10}],
189
189
  )
190
190
 
191
191
  def test_scan_destination_pack_bin_not_found(self):
@@ -198,7 +198,7 @@ class ClusterPickingScanDestinationPackCase(ClusterPickingCommonCase):
198
198
  "move_line_id": line.id,
199
199
  # this bin is used for the other picking
200
200
  "barcode": "⌿",
201
- "quantity": line.reserved_uom_qty,
201
+ "quantity": line.quantity,
202
202
  },
203
203
  )
204
204
  line_data = self._line_data(line)
@@ -222,7 +222,7 @@ class ClusterPickingScanDestinationPackCase(ClusterPickingCommonCase):
222
222
  "picking_batch_id": self.batch.id,
223
223
  "move_line_id": line.id,
224
224
  "barcode": self.bin1.name,
225
- "quantity": line.reserved_uom_qty + 1,
225
+ "quantity": line.quantity + 1,
226
226
  },
227
227
  )
228
228
  self.assert_response(
@@ -231,7 +231,7 @@ class ClusterPickingScanDestinationPackCase(ClusterPickingCommonCase):
231
231
  data=self._line_data(line, qty_done=11.0),
232
232
  message={
233
233
  "message_type": "error",
234
- "body": f"You must not pick more than {line.reserved_uom_qty} units.",
234
+ "body": f"You must not pick more than {line.quantity} units.",
235
235
  },
236
236
  )
237
237
 
@@ -256,7 +256,7 @@ class ClusterPickingScanDestinationPackCase(ClusterPickingCommonCase):
256
256
  "picking_batch_id": self.batch.id,
257
257
  "move_line_id": line.id,
258
258
  "barcode": self.bin1.name,
259
- "quantity": line.reserved_uom_qty - 3,
259
+ "quantity": line.quantity - 3,
260
260
  },
261
261
  )
262
262
  new_line = self.one_line_picking.move_line_ids - line
@@ -273,11 +273,11 @@ class ClusterPickingScanDestinationPackCase(ClusterPickingCommonCase):
273
273
 
274
274
  self.assertRecordValues(
275
275
  line,
276
- [{"qty_done": 7, "result_package_id": self.bin1.id, "reserved_uom_qty": 7}],
276
+ [{"qty_done": 7, "result_package_id": self.bin1.id, "quantity": 7}],
277
277
  )
278
278
  self.assertRecordValues(
279
279
  new_line,
280
- [{"qty_done": 0, "result_package_id": False, "reserved_uom_qty": 3}],
280
+ [{"qty_done": 0, "result_package_id": False, "quantity": 3}],
281
281
  )
282
282
  # the reserved quantity on the quant must stay the same
283
283
  self.assertRecordValues(quant, [{"quantity": 40.0, "reserved_quantity": 20.0}])
@@ -300,7 +300,7 @@ class ClusterPickingScanDestinationPackCase(ClusterPickingCommonCase):
300
300
  location, product, qty = (
301
301
  self.zero_check_location,
302
302
  line.product_id,
303
- line.reserved_uom_qty,
303
+ line.quantity,
304
304
  )
305
305
  self.one_line_picking.do_unreserve()
306
306
 
@@ -320,7 +320,7 @@ class ClusterPickingScanDestinationPackCase(ClusterPickingCommonCase):
320
320
  "picking_batch_id": self.batch.id,
321
321
  "move_line_id": line.id,
322
322
  "barcode": self.bin1.name,
323
- "quantity": line.reserved_uom_qty,
323
+ "quantity": line.quantity,
324
324
  },
325
325
  )
326
326
 
@@ -342,16 +342,14 @@ class ClusterPickingScanDestinationPackCase(ClusterPickingCommonCase):
342
342
  # Update the quantity in the location to be equal to the line's
343
343
  # so when scan_destination_pack sets the qty_done, the planned
344
344
  # qty should be zero and trigger a zero check
345
- self._update_qty_in_location(
346
- line.location_id, line.product_id, line.reserved_uom_qty
347
- )
345
+ self._update_qty_in_location(line.location_id, line.product_id, line.quantity)
348
346
  response = self.service.dispatch(
349
347
  "scan_destination_pack",
350
348
  params={
351
349
  "picking_batch_id": self.batch.id,
352
350
  "move_line_id": line.id,
353
351
  "barcode": self.bin1.name,
354
- "quantity": line.reserved_uom_qty,
352
+ "quantity": line.quantity,
355
353
  },
356
354
  )
357
355
 
@@ -16,7 +16,7 @@ class ClusterPickingScanLineNoPrefillQtyCase(ClusterPickingLineCommonCase):
16
16
  cls.menu.sudo().no_prefill_qty = True
17
17
  cls.picking = cls.batch.picking_ids
18
18
  cls.line = cls.picking.move_line_ids
19
- cls.line.reserved_uom_qty = 3
19
+ cls.line.quantity = 3
20
20
 
21
21
  def _assert_qty_done(self, line, scanned, expected_qty_done):
22
22
  batch = line.picking_id.batch_id
@@ -126,7 +126,7 @@ class ClusterPickingStockIssue(ClusterPickingCommonCase):
126
126
  + sum(
127
127
  self.batch_other.picking_ids.move_line_ids.filtered(
128
128
  lambda x: x.location_id == self.shelf2
129
- ).mapped("reserved_uom_qty")
129
+ ).mapped("quantity")
130
130
  )
131
131
  )
132
132
  # we should have a quant with 20 quantity and 20 reserved
@@ -336,9 +336,9 @@ class ClusterPickingStockIssue(ClusterPickingCommonCase):
336
336
  new_line, __ = pick_line1._split_qty_to_be_done(1)
337
337
  self._set_dest_package_and_done(pick_line1, self.dest_package)
338
338
 
339
- self.assertEqual(pick_line1.reserved_qty, 1.0)
340
- self.assertEqual(new_line.reserved_qty, 1.0)
341
- self.assertEqual(pick_line2.reserved_qty, 8.0)
339
+ self.assertEqual(pick_line1.quantity_product_uom, 1.0)
340
+ self.assertEqual(new_line.quantity_product_uom, 1.0)
341
+ self.assertEqual(pick_line2.quantity_product_uom, 8.0)
342
342
  # on the third move, the operator can't pick anymore in shelf1
343
343
  # because there is nothing inside, they declare a stock issue
344
344
  self._stock_issue(new_line, next_line_func=lambda: pick_line2)
@@ -358,7 +358,7 @@ class ClusterPickingStockIssue(ClusterPickingCommonCase):
358
358
  self.assertFalse(new_line.exists())
359
359
  # the second line to pick has been raised to 9 instead of 8
360
360
  # initially, to compensate the stock out
361
- self.assertEqual(pick_line2.reserved_qty, 9.0)
361
+ self.assertEqual(pick_line2.quantity_product_uom, 9.0)
362
362
 
363
363
  # quant with stock out has been updated
364
364
  self.assertEqual(package1.quant_ids.quantity, 1.0)
@@ -25,7 +25,7 @@ class DeliveryCommonCase(CommonCase):
25
25
  .create(
26
26
  {
27
27
  "name": "Product E",
28
- "type": "product",
28
+ "is_storable": True,
29
29
  "default_code": "E",
30
30
  "barcode": "E",
31
31
  "weight": 3,
@@ -49,7 +49,7 @@ class DeliveryCommonCase(CommonCase):
49
49
  .create(
50
50
  {
51
51
  "name": "Product F",
52
- "type": "product",
52
+ "is_storable": True,
53
53
  "default_code": "F",
54
54
  "barcode": "F",
55
55
  "weight": 3,
@@ -73,7 +73,7 @@ class DeliveryCommonCase(CommonCase):
73
73
  .create(
74
74
  {
75
75
  "name": "Product G",
76
- "type": "product",
76
+ "is_storable": True,
77
77
  "default_code": "G",
78
78
  "barcode": "G",
79
79
  "weight": 1,
@@ -142,9 +142,7 @@ class DeliveryCommonCase(CommonCase):
142
142
  for qty in qties:
143
143
  expected_qties.append({"qty_done": qty})
144
144
  else:
145
- expected_qties = [
146
- {"qty_done": line.reserved_uom_qty} for line in move_lines
147
- ]
145
+ expected_qties = [{"qty_done": line.quantity} for line in move_lines]
148
146
  self.assertRecordValues(move_lines, expected_qties)
149
147
  package_level = move_lines.package_level_id
150
148
  if package_level:
@@ -45,7 +45,7 @@ class DeliveryDoneCase(DeliveryCommonCase):
45
45
  # Do not use the /set_qty_done_line endpoint to set done qties to not
46
46
  # update the picking to 'done' state automatically
47
47
  for move_line in self.picking.move_line_ids:
48
- move_line.qty_done = move_line.reserved_uom_qty
48
+ move_line.qty_done = move_line.quantity
49
49
  response = self.service.dispatch("done", params={"picking_id": self.picking.id})
50
50
  self.assert_response_deliver(
51
51
  response,
@@ -72,7 +72,7 @@ class DeliveryResetQtyDoneLineCase(DeliveryCommonCase):
72
72
  "set_qty_done_line",
73
73
  params={"move_line_id": move_line.id, "picking_id": self.picking.id},
74
74
  )
75
- self.assertTrue(move_line.qty_done == move_line.reserved_uom_qty)
75
+ self.assertTrue(move_line.qty_done == move_line.quantity)
76
76
  # Reset it, no related move lines are "done"
77
77
  response = self.service.dispatch(
78
78
  "reset_qty_done_line",
@@ -73,7 +73,7 @@ class DeliveryResetQtyDonePackCase(DeliveryCommonCase):
73
73
  "set_qty_done_pack",
74
74
  params={"package_id": package.id, "picking_id": self.picking.id},
75
75
  )
76
- self.assertTrue(all(ml.qty_done == ml.reserved_uom_qty for ml in move_lines))
76
+ self.assertTrue(all(ml.qty_done == ml.quantity for ml in move_lines))
77
77
  # Reset it, no related move lines are "done"
78
78
  response = self.service.dispatch(
79
79
  "reset_qty_done_pack",
@@ -171,7 +171,7 @@ class DeliveryScanDeliverCase(DeliveryCommonCase):
171
171
  response, message=self.service.msg_store.transfer_complete(self.picking)
172
172
  )
173
173
  for line in move_lines:
174
- self.assertEqual(line.move_id.product_uom_qty, line.move_id.quantity_done)
174
+ self.assertEqual(line.move_id.product_uom_qty, line.move_id.quantity_picked)
175
175
  self.assertEqual(line.move_id.state, "done")
176
176
  self.assertEqual(self.picking.state, "done")
177
177
  self.assertTrue(self.picking.backorder_ids)
@@ -285,7 +285,7 @@ class DeliveryScanDeliverCase(DeliveryCommonCase):
285
285
  self.assert_response_deliver(
286
286
  response, message=self.service.msg_store.transfer_complete(self.picking)
287
287
  )
288
- self.assertEqual(raw_move2.quantity_done, 1)
288
+ self.assertEqual(raw_move2.quantity_picked, 1)
289
289
  self.assertEqual(raw_move2.state, "done")
290
290
 
291
291
  def test_scan_deliver_scan_product_not_found(self):
@@ -308,7 +308,7 @@ class DeliveryScanDeliverCase(DeliveryCommonCase):
308
308
  )
309
309
  self.assertEqual(line.qty_done, 1)
310
310
  self.assertEqual(line.state, "assigned")
311
- for _ in range(int(line.reserved_uom_qty) - 1):
311
+ for _ in range(int(line.quantity) - 1):
312
312
  self.service.dispatch(
313
313
  "scan_deliver",
314
314
  params={
@@ -405,7 +405,7 @@ class DeliveryScanDeliverCase(DeliveryCommonCase):
405
405
  "scan_deliver", params={"barcode": self.packaging.barcode}
406
406
  )
407
407
  self.assert_response_deliver(response, picking=self.picking)
408
- self.assertEqual(line.move_id.product_qty, line.move_id.quantity_done)
408
+ self.assertEqual(line.move_id.product_qty, line.move_id.quantity_picked)
409
409
  self.assertEqual(line.move_id.state, "assigned")
410
410
 
411
411
  def test_scan_deliver_scan_product_packaging_partial_qty_with_prepackaged_product(
@@ -566,7 +566,7 @@ class DeliveryScanDeliverCase(DeliveryCommonCase):
566
566
  )
567
567
  # Re-force qty to 1, as setting the lot resets qty to 0
568
568
  cleanup_picking.move_line_ids.lot_id = cleanup_lot
569
- cleanup_picking.move_line_ids.reserved_uom_qty = 1.0
569
+ cleanup_picking.move_line_ids.quantity = 1.0
570
570
  params = {"barcode": "CLEANUP_LOT"}
571
571
  response = self.service.dispatch("scan_deliver", params=params)
572
572
  type_name = cleanup_picking.picking_type_id.name
@@ -688,7 +688,7 @@ class DeliveryScanDeliverSpecialCase(DeliveryCommonCase):
688
688
  picking = self._create_picking(lines=[(self.product_a, 10)])
689
689
  self._fill_stock_for_moves(picking.move_ids, in_package=True)
690
690
  picking.action_assign()
691
- picking.move_line_ids.qty_done = picking.move_line_ids.reserved_uom_qty
691
+ picking.move_line_ids.qty_done = picking.move_line_ids.quantity
692
692
  picking._action_done()
693
693
  response = self.service.dispatch(
694
694
  "scan_deliver", params={"barcode": picking.name}
@@ -26,7 +26,7 @@ class LocationContentTransferCommonCase(CommonCase):
26
26
  .create(
27
27
  {
28
28
  "name": "Product E",
29
- "type": "product",
29
+ "is_storable": True,
30
30
  "default_code": "E",
31
31
  "barcode": "E",
32
32
  "weight": 3,
@@ -94,7 +94,7 @@ class LocationContentTransferCommonCase(CommonCase):
94
94
  """
95
95
  pickings.user_id = cls.env.uid
96
96
  for line in pickings.mapped("move_line_ids"):
97
- line.qty_done = line.reserved_uom_qty
97
+ line.qty_done = line.quantity
98
98
 
99
99
  def assert_response_start(self, response, message=None, popup=None):
100
100
  self.assert_response(
@@ -122,7 +122,7 @@ class LocationContentTransferMixCase(LocationContentTransferCommonCase):
122
122
  # Set the destination on the move line
123
123
  if not dest_location:
124
124
  dest_location = move_line.location_dest_id
125
- qty = move_line.reserved_uom_qty
125
+ qty = move_line.quantity
126
126
  response = self.zp_service.set_destination(
127
127
  move_line.id,
128
128
  dest_location.barcode,
@@ -153,7 +153,7 @@ class LocationContentTransferMixCase(LocationContentTransferCommonCase):
153
153
  # Set the destination
154
154
  if set_destination:
155
155
  assert response["next_state"] in ("scan_destination_all", "start_single")
156
- qty = move_line.reserved_uom_qty
156
+ qty = move_line.quantity
157
157
  if response["next_state"] == "scan_destination_all":
158
158
  response = service.set_destination_all(
159
159
  pack_location.id, out_location.barcode
@@ -305,12 +305,12 @@ class LocationContentTransferMixCase(LocationContentTransferCommonCase):
305
305
  pack_first_pallet = pack_move_a.move_line_ids.filtered(
306
306
  lambda x: not x.shopfloor_user_id and x.location_id == dest_location1
307
307
  )
308
- self.assertEqual(pack_first_pallet.reserved_uom_qty, 6)
308
+ self.assertEqual(pack_first_pallet.quantity, 6)
309
309
  self.assertEqual(pack_first_pallet.qty_done, 0)
310
310
  pack_second_pallet = pack_move_a.move_line_ids.filtered(
311
311
  lambda x: not x.shopfloor_user_id and x.location_id == dest_location2
312
312
  )
313
- self.assertEqual(pack_second_pallet.reserved_uom_qty, 4)
313
+ self.assertEqual(pack_second_pallet.quantity, 4)
314
314
  self.assertEqual(pack_second_pallet.qty_done, 0)
315
315
  # Operator-2 with the "location content transfer" scenario scan
316
316
  # the location where the first pallet is.
@@ -345,7 +345,7 @@ class LocationContentTransferMixCase(LocationContentTransferCommonCase):
345
345
  message=self.service.msg_store.recovered_previous_session(),
346
346
  )
347
347
  # Operator-2 finishes its operation regarding the first pallet
348
- qty = pack_first_pallet.reserved_uom_qty
348
+ qty = pack_first_pallet.quantity
349
349
  response = self.service.set_destination_all(
350
350
  pack_first_pallet.location_id.id, pack_first_pallet.location_dest_id.barcode
351
351
  )
@@ -446,7 +446,7 @@ class LocationContentTransferMixCase(LocationContentTransferCommonCase):
446
446
  pack_first_pallet = pack_move_a1.move_line_ids.filtered(
447
447
  lambda x: not x.shopfloor_user_id and x.location_id == dest_location1
448
448
  )
449
- self.assertEqual(pack_first_pallet.reserved_uom_qty, 6)
449
+ self.assertEqual(pack_first_pallet.quantity, 6)
450
450
  self.assertEqual(pack_first_pallet.qty_done, 0)
451
451
  # Operator-2 with the "location content transfer" scenario scan
452
452
  # the location where the first pallet is.
@@ -472,7 +472,7 @@ class LocationContentTransferMixCase(LocationContentTransferCommonCase):
472
472
  pack_second_pallet = pack_move_a2.move_line_ids.filtered(
473
473
  lambda x: not x.shopfloor_user_id and x.location_id == dest_location2
474
474
  )
475
- self.assertEqual(pack_second_pallet.reserved_uom_qty, 4)
475
+ self.assertEqual(pack_second_pallet.quantity, 4)
476
476
  self.assertEqual(pack_second_pallet.qty_done, 0)
477
477
  # The last action has updated the pack operation (new move line) in the
478
478
  # transfer previously processed by Operator-2.
@@ -481,7 +481,7 @@ class LocationContentTransferMixCase(LocationContentTransferCommonCase):
481
481
  # Operator-2 finishes its operation regarding the first pallet without
482
482
  # any trouble as the processed move line has been put in its own
483
483
  # move+transfer
484
- qty = pack_first_pallet.reserved_uom_qty
484
+ qty = pack_first_pallet.quantity
485
485
  response = self.service.set_destination_all(
486
486
  pack_first_pallet.location_id.id, pack_first_pallet.location_dest_id.barcode
487
487
  )