odoo-addon-shopfloor 16.0.2.7.0.2__py3-none-any.whl → 16.0.2.8.0.1__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 (69) hide show
  1. odoo/addons/shopfloor/README.rst +1 -1
  2. odoo/addons/shopfloor/__manifest__.py +1 -1
  3. odoo/addons/shopfloor/actions/change_package_lot.py +3 -1
  4. odoo/addons/shopfloor/actions/data.py +2 -1
  5. odoo/addons/shopfloor/actions/data_detail.py +2 -2
  6. odoo/addons/shopfloor/actions/location_content_transfer_sorter.py +0 -1
  7. odoo/addons/shopfloor/actions/message.py +12 -6
  8. odoo/addons/shopfloor/actions/move_line_search.py +3 -1
  9. odoo/addons/shopfloor/actions/savepoint.py +1 -1
  10. odoo/addons/shopfloor/actions/schema.py +0 -1
  11. odoo/addons/shopfloor/actions/search.py +2 -2
  12. odoo/addons/shopfloor/actions/stock.py +1 -1
  13. odoo/addons/shopfloor/demo/shopfloor_app_demo.xml +7 -7
  14. odoo/addons/shopfloor/i18n/ca.po +8 -8
  15. odoo/addons/shopfloor/i18n/de.po +8 -8
  16. odoo/addons/shopfloor/i18n/es_AR.po +8 -8
  17. odoo/addons/shopfloor/i18n/it.po +15 -10
  18. odoo/addons/shopfloor/i18n/pt_BR.po +8 -8
  19. odoo/addons/shopfloor/i18n/shopfloor.pot +8 -8
  20. odoo/addons/shopfloor/migrations/16.0.2.0.0/post-migration.py +1 -3
  21. odoo/addons/shopfloor/models/shopfloor_menu.py +5 -3
  22. odoo/addons/shopfloor/models/stock_picking.py +2 -1
  23. odoo/addons/shopfloor/services/checkout.py +16 -16
  24. odoo/addons/shopfloor/services/cluster_picking.py +10 -10
  25. odoo/addons/shopfloor/services/delivery.py +3 -3
  26. odoo/addons/shopfloor/services/service.py +0 -1
  27. odoo/addons/shopfloor/services/single_pack_transfer.py +0 -1
  28. odoo/addons/shopfloor/services/zone_picking.py +16 -13
  29. odoo/addons/shopfloor/static/description/index.html +1 -1
  30. odoo/addons/shopfloor/tests/common.py +0 -1
  31. odoo/addons/shopfloor/tests/models.py +1 -0
  32. odoo/addons/shopfloor/tests/test_actions_change_package_lot.py +6 -10
  33. odoo/addons/shopfloor/tests/test_actions_data_base.py +4 -4
  34. odoo/addons/shopfloor/tests/test_checkout_auto_post.py +7 -6
  35. odoo/addons/shopfloor/tests/test_checkout_base.py +1 -6
  36. odoo/addons/shopfloor/tests/test_checkout_change_packaging.py +1 -1
  37. odoo/addons/shopfloor/tests/test_checkout_done.py +1 -1
  38. odoo/addons/shopfloor/tests/test_checkout_list_delivery_packaging.py +1 -1
  39. odoo/addons/shopfloor/tests/test_checkout_scan.py +1 -1
  40. odoo/addons/shopfloor/tests/test_checkout_scan_line.py +4 -4
  41. odoo/addons/shopfloor/tests/test_checkout_scan_line_no_prefill_qty.py +3 -3
  42. odoo/addons/shopfloor/tests/test_checkout_scan_package_action.py +10 -10
  43. odoo/addons/shopfloor/tests/test_cluster_picking_is_zero.py +2 -10
  44. odoo/addons/shopfloor/tests/test_cluster_picking_scan_destination.py +6 -14
  45. odoo/addons/shopfloor/tests/test_cluster_picking_scan_line_location_or_pack_first.py +1 -2
  46. odoo/addons/shopfloor/tests/test_cluster_picking_stock_issue.py +3 -3
  47. odoo/addons/shopfloor/tests/test_cluster_picking_unload.py +3 -3
  48. odoo/addons/shopfloor/tests/test_delivery_scan_deliver.py +1 -1
  49. odoo/addons/shopfloor/tests/test_location_content_transfer_get_work.py +5 -2
  50. odoo/addons/shopfloor/tests/test_location_content_transfer_mix.py +12 -11
  51. odoo/addons/shopfloor/tests/test_menu_contrains.py +0 -1
  52. odoo/addons/shopfloor/tests/test_single_pack_transfer.py +9 -9
  53. odoo/addons/shopfloor/tests/test_stock_split.py +1 -1
  54. odoo/addons/shopfloor/tests/test_zone_picking_base.py +11 -10
  55. odoo/addons/shopfloor/tests/test_zone_picking_complete_mix_pack_flux.py +2 -2
  56. odoo/addons/shopfloor/tests/test_zone_picking_require_destination_package.py +1 -1
  57. odoo/addons/shopfloor/tests/test_zone_picking_select_line.py +15 -15
  58. odoo/addons/shopfloor/tests/test_zone_picking_select_line_no_prefill_qty.py +2 -2
  59. odoo/addons/shopfloor/tests/test_zone_picking_set_line_destination.py +9 -9
  60. odoo/addons/shopfloor/tests/test_zone_picking_set_line_destination_no_prefill_qty.py +1 -1
  61. odoo/addons/shopfloor/tests/test_zone_picking_set_line_destination_package_not_allowed.py +2 -2
  62. odoo/addons/shopfloor/tests/test_zone_picking_set_line_destination_pick_pack.py +2 -2
  63. odoo/addons/shopfloor/tests/test_zone_picking_unload_all.py +3 -1
  64. odoo/addons/shopfloor/tests/test_zone_picking_unload_set_destination.py +2 -2
  65. odoo/addons/shopfloor/views/shopfloor_menu.xml +96 -89
  66. {odoo_addon_shopfloor-16.0.2.7.0.2.dist-info → odoo_addon_shopfloor-16.0.2.8.0.1.dist-info}/METADATA +2 -2
  67. {odoo_addon_shopfloor-16.0.2.7.0.2.dist-info → odoo_addon_shopfloor-16.0.2.8.0.1.dist-info}/RECORD +69 -69
  68. {odoo_addon_shopfloor-16.0.2.7.0.2.dist-info → odoo_addon_shopfloor-16.0.2.8.0.1.dist-info}/WHEEL +0 -0
  69. {odoo_addon_shopfloor-16.0.2.7.0.2.dist-info → odoo_addon_shopfloor-16.0.2.8.0.1.dist-info}/top_level.txt +0 -0
@@ -7,7 +7,7 @@ Shopfloor
7
7
  !! This file is generated by oca-gen-addon-readme !!
8
8
  !! changes will be overwritten. !!
9
9
  !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
10
- !! source digest: sha256:986a6c228f6ee438330907a4be64b74f7291bb1acfc6498a2617ed5e69777d9e
10
+ !! source digest: sha256:8f4a1f9cca9cb3a4830c65a6a9d8a65ec3334a34722525fe5da87e77b0e90de2
11
11
  !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
12
12
 
13
13
  .. |badge1| image:: https://img.shields.io/badge/maturity-Beta-yellow.png
@@ -6,7 +6,7 @@
6
6
  {
7
7
  "name": "Shopfloor",
8
8
  "summary": "manage warehouse operations with barcode scanners",
9
- "version": "16.0.2.7.0",
9
+ "version": "16.0.2.8.0",
10
10
  "development_status": "Beta",
11
11
  "category": "Inventory",
12
12
  "website": "https://github.com/OCA/wms",
@@ -171,5 +171,7 @@ class ChangePackageLot(Component):
171
171
  restricts the reservation based on the previous move(s).
172
172
  """
173
173
  return move_lines.filtered(
174
- lambda l: (l.product_id == lot.product_id and not l.move_id.move_orig_ids)
174
+ lambda x, lot=lot: (
175
+ x.product_id == lot.product_id and not x.move_id.move_orig_ids
176
+ )
175
177
  )
@@ -351,7 +351,8 @@ class DataAction(Component):
351
351
 
352
352
  def _get_operation_progress(self, domain):
353
353
  lines = self.env["stock.move.line"].search(domain)
354
- # operations_to_do = number of total operations that are pending for this location.
354
+ # operations_to_do = number of total operations
355
+ # that are pending for this location.
355
356
  # operations_done = number of operations already done.
356
357
  operations_to_do = 0
357
358
  operations_done = 0
@@ -212,7 +212,7 @@ class DataDetailAction(Component):
212
212
  def _product_image_url(self, record, field_name):
213
213
  if not record[field_name]:
214
214
  return None
215
- return "/web/image/product.product/{}/{}".format(record.id, field_name)
215
+ return f"/web/image/product.product/{record.id}/{field_name}"
216
216
 
217
217
  @property
218
218
  def _product_supplierinfo_parser(self):
@@ -228,7 +228,7 @@ class DataDetailAction(Component):
228
228
  return self._jsonify(
229
229
  record.with_context(packaging=record.id),
230
230
  self._packaging_detail_parser,
231
- **kw
231
+ **kw,
232
232
  )
233
233
 
234
234
  @property
@@ -4,7 +4,6 @@ from odoo.addons.component.core import Component
4
4
 
5
5
 
6
6
  class LocationContentTransferSorter(Component):
7
-
8
7
  _name = "shopfloor.location.content.transfer.sorter"
9
8
  _inherit = "shopfloor.process.action"
10
9
  _usage = "location_content_transfer.sorter"
@@ -123,7 +123,8 @@ class MessageAction(Component):
123
123
  return {
124
124
  "message_type": "warning",
125
125
  "body": _(
126
- "Package %(package_name)s is not available in transfer %(picking_name)s.",
126
+ "Package %(package_name)s "
127
+ "is not available in transfer %(picking_name)s.",
127
128
  package_name=package.name,
128
129
  picking_name=picking.name,
129
130
  ),
@@ -314,7 +315,8 @@ class MessageAction(Component):
314
315
  return {
315
316
  "message_type": "warning",
316
317
  "body": _(
317
- "Several moves found on different locations, please scan first the location."
318
+ "Several moves found on different locations, "
319
+ "please scan first the location."
318
320
  ),
319
321
  }
320
322
 
@@ -435,7 +437,8 @@ class MessageAction(Component):
435
437
  "message_type": "warning",
436
438
  "body": _(
437
439
  _(
438
- "This source document is part of multiple transfers, please scan a package."
440
+ "This source document is part of multiple transfers, "
441
+ "please scan a package."
439
442
  )
440
443
  ),
441
444
  }
@@ -511,8 +514,10 @@ class MessageAction(Component):
511
514
  return {
512
515
  "message_type": "warning",
513
516
  "body": _(
514
- "{message_code} not found in the current transfer or already in a package."
515
- ).format(message_code=message_code),
517
+ "%(message_code)s not found in the current transfer "
518
+ "or already in a package.",
519
+ message_code=message_code,
520
+ ),
516
521
  }
517
522
 
518
523
  def packaging_not_found_in_picking(self):
@@ -757,7 +762,8 @@ class MessageAction(Component):
757
762
  return {
758
763
  "message_type": "warning",
759
764
  "body": _(
760
- "Please note that the scanned quantity is higher than the maximum allowed."
765
+ "Please note that the scanned quantity "
766
+ "is higher than the maximum allowed."
761
767
  ),
762
768
  }
763
769
 
@@ -53,7 +53,9 @@ class MoveLineSearch(Component):
53
53
  "key": None,
54
54
  "get_sort_key_priority": self._sort_key_move_lines_priority,
55
55
  "get_sort_key_location": self._sort_key_move_lines_location,
56
- "get_sort_key_assigned_to_current_user": self._sort_key_assigned_to_current_user,
56
+ "get_sort_key_assigned_to_current_user": (
57
+ self._sort_key_assigned_to_current_user
58
+ ),
57
59
  }
58
60
 
59
61
  def _search_move_lines_domain(
@@ -18,7 +18,7 @@ class SavepointBuilder(Component):
18
18
  return Savepoint(self.env.cr)
19
19
 
20
20
 
21
- class Savepoint(object):
21
+ class Savepoint:
22
22
  """Wrapper for SQL Savepoint
23
23
 
24
24
  Close to "cr.savepoint()" context manager but this class gives more control
@@ -4,7 +4,6 @@ from odoo.addons.component.core import Component
4
4
 
5
5
 
6
6
  class ShopfloorSchemaAction(Component):
7
-
8
7
  _inherit = "shopfloor.schema.action"
9
8
 
10
9
  def picking(self):
@@ -8,7 +8,6 @@ from odoo.addons.component.core import Component
8
8
 
9
9
 
10
10
  class SearchResult:
11
-
12
11
  __slots__ = ("record", "type", "code")
13
12
 
14
13
  def __init__(self, **kw) -> None:
@@ -31,7 +30,8 @@ class SearchResult:
31
30
 
32
31
  @property
33
32
  def records(self):
34
- """In some cases we expect more than one records (eg: location limit > 1) or lots"""
33
+ # In some cases we expect more than one records
34
+ # (eg: location limit > 1) or lots
35
35
  return self.record if len(self.record) > 1 else None
36
36
 
37
37
 
@@ -150,7 +150,7 @@ class StockAction(Component):
150
150
  pickings = move_lines.picking_id
151
151
  for picking in pickings:
152
152
  lines_still_assigned = picking.move_line_ids.filtered(
153
- lambda l: l.shopfloor_user_id
153
+ lambda x: x.shopfloor_user_id
154
154
  )
155
155
  if lines_still_assigned:
156
156
  # Because there is other lines in the picking still assigned
@@ -1,12 +1,12 @@
1
1
  <odoo noupdate="1">
2
- <record id="app_demo" model="shopfloor.app">
3
- <field name="name">Shopfloor WMS (demo)</field>
4
- <field name="short_name">WMS (demo)</field>
5
- <field name="tech_name">wms_demo</field>
6
- <field name="category">wms</field>
7
- <field
2
+ <record id="app_demo" model="shopfloor.app">
3
+ <field name="name">Shopfloor WMS (demo)</field>
4
+ <field name="short_name">WMS (demo)</field>
5
+ <field name="tech_name">wms_demo</field>
6
+ <field name="category">wms</field>
7
+ <field
8
8
  name="profile_ids"
9
9
  eval="[(4, ref('shopfloor.profile_demo_1')), (4, ref('shopfloor.profile_demo_2'))]"
10
10
  />
11
- </record>
11
+ </record>
12
12
  </odoo>
@@ -91,6 +91,14 @@ msgid ""
91
91
  "Incompatible with: \"Pick and pack at the same time\"\n"
92
92
  msgstr ""
93
93
 
94
+ #. module: shopfloor
95
+ #. odoo-python
96
+ #: code:addons/shopfloor/actions/message.py:0
97
+ #, python-format
98
+ msgid ""
99
+ "%(message_code)s not found in the current transfer or already in a package."
100
+ msgstr ""
101
+
94
102
  #. module: shopfloor
95
103
  #. odoo-python
96
104
  #: code:addons/shopfloor/actions/message.py:0
@@ -2173,14 +2181,6 @@ msgstr ""
2173
2181
  msgid "Zone Picking"
2174
2182
  msgstr ""
2175
2183
 
2176
- #. module: shopfloor
2177
- #. odoo-python
2178
- #: code:addons/shopfloor/actions/message.py:0
2179
- #, python-format
2180
- msgid ""
2181
- "{message_code} not found in the current transfer or already in a package."
2182
- msgstr ""
2183
-
2184
2184
  #. module: shopfloor
2185
2185
  #. odoo-python
2186
2186
  #: code:addons/shopfloor/actions/message.py:0
@@ -89,6 +89,14 @@ msgid ""
89
89
  "Incompatible with: \"Pick and pack at the same time\"\n"
90
90
  msgstr ""
91
91
 
92
+ #. module: shopfloor
93
+ #. odoo-python
94
+ #: code:addons/shopfloor/actions/message.py:0
95
+ #, python-format
96
+ msgid ""
97
+ "%(message_code)s not found in the current transfer or already in a package."
98
+ msgstr ""
99
+
92
100
  #. module: shopfloor
93
101
  #. odoo-python
94
102
  #: code:addons/shopfloor/actions/message.py:0
@@ -2169,14 +2177,6 @@ msgstr ""
2169
2177
  msgid "Zone Picking"
2170
2178
  msgstr ""
2171
2179
 
2172
- #. module: shopfloor
2173
- #. odoo-python
2174
- #: code:addons/shopfloor/actions/message.py:0
2175
- #, python-format
2176
- msgid ""
2177
- "{message_code} not found in the current transfer or already in a package."
2178
- msgstr ""
2179
-
2180
2180
  #. module: shopfloor
2181
2181
  #. odoo-python
2182
2182
  #: code:addons/shopfloor/actions/message.py:0
@@ -119,6 +119,14 @@ msgstr ""
119
119
  "\n"
120
120
  "Incompatible con: \"Recoger y empaquetar al mismo tiempo\"\n"
121
121
 
122
+ #. module: shopfloor
123
+ #. odoo-python
124
+ #: code:addons/shopfloor/actions/message.py:0
125
+ #, python-format
126
+ msgid ""
127
+ "%(message_code)s not found in the current transfer or already in a package."
128
+ msgstr ""
129
+
122
130
  #. module: shopfloor
123
131
  #. odoo-python
124
132
  #: code:addons/shopfloor/actions/message.py:0
@@ -2279,14 +2287,6 @@ msgstr ""
2279
2287
  msgid "Zone Picking"
2280
2288
  msgstr "Zona de Entreda"
2281
2289
 
2282
- #. module: shopfloor
2283
- #. odoo-python
2284
- #: code:addons/shopfloor/actions/message.py:0
2285
- #, python-format
2286
- msgid ""
2287
- "{message_code} not found in the current transfer or already in a package."
2288
- msgstr ""
2289
-
2290
2290
  #. module: shopfloor
2291
2291
  #. odoo-python
2292
2292
  #: code:addons/shopfloor/actions/message.py:0
@@ -136,6 +136,14 @@ msgstr ""
136
136
  "\n"
137
137
  "Incompatibile con: \"Preleva e imballa contemporaneamente\"\n"
138
138
 
139
+ #. module: shopfloor
140
+ #. odoo-python
141
+ #: code:addons/shopfloor/actions/message.py:0
142
+ #, python-format
143
+ msgid ""
144
+ "%(message_code)s not found in the current transfer or already in a package."
145
+ msgstr ""
146
+
139
147
  #. module: shopfloor
140
148
  #. odoo-python
141
149
  #: code:addons/shopfloor/actions/message.py:0
@@ -2343,16 +2351,6 @@ msgstr ""
2343
2351
  msgid "Zone Picking"
2344
2352
  msgstr "Prelievo per area"
2345
2353
 
2346
- #. module: shopfloor
2347
- #. odoo-python
2348
- #: code:addons/shopfloor/actions/message.py:0
2349
- #, python-format
2350
- msgid ""
2351
- "{message_code} not found in the current transfer or already in a package."
2352
- msgstr ""
2353
- "{message_code} non trovato nel trasferimento attuale o già presente in un "
2354
- "collo."
2355
-
2356
2354
  #. module: shopfloor
2357
2355
  #. odoo-python
2358
2356
  #: code:addons/shopfloor/actions/message.py:0
@@ -2360,6 +2358,13 @@ msgstr ""
2360
2358
  msgid "{} is not a valid destination package."
2361
2359
  msgstr "{} non è un collo destinazione valido."
2362
2360
 
2361
+ #, python-format
2362
+ #~ msgid ""
2363
+ #~ "{message_code} not found in the current transfer or already in a package."
2364
+ #~ msgstr ""
2365
+ #~ "{message_code} non trovato nel trasferimento attuale o già presente in un "
2366
+ #~ "collo."
2367
+
2363
2368
  #, python-format
2364
2369
  #~ msgid "Package {} is not in the current transfer."
2365
2370
  #~ msgstr "Il collo {} non è nel trasferimento attuale."
@@ -89,6 +89,14 @@ msgid ""
89
89
  "Incompatible with: \"Pick and pack at the same time\"\n"
90
90
  msgstr ""
91
91
 
92
+ #. module: shopfloor
93
+ #. odoo-python
94
+ #: code:addons/shopfloor/actions/message.py:0
95
+ #, python-format
96
+ msgid ""
97
+ "%(message_code)s not found in the current transfer or already in a package."
98
+ msgstr ""
99
+
92
100
  #. module: shopfloor
93
101
  #. odoo-python
94
102
  #: code:addons/shopfloor/actions/message.py:0
@@ -2169,14 +2177,6 @@ msgstr ""
2169
2177
  msgid "Zone Picking"
2170
2178
  msgstr ""
2171
2179
 
2172
- #. module: shopfloor
2173
- #. odoo-python
2174
- #: code:addons/shopfloor/actions/message.py:0
2175
- #, python-format
2176
- msgid ""
2177
- "{message_code} not found in the current transfer or already in a package."
2178
- msgstr ""
2179
-
2180
2180
  #. module: shopfloor
2181
2181
  #. odoo-python
2182
2182
  #: code:addons/shopfloor/actions/message.py:0
@@ -85,6 +85,14 @@ msgid ""
85
85
  "Incompatible with: \"Pick and pack at the same time\"\n"
86
86
  msgstr ""
87
87
 
88
+ #. module: shopfloor
89
+ #. odoo-python
90
+ #: code:addons/shopfloor/actions/message.py:0
91
+ #, python-format
92
+ msgid ""
93
+ "%(message_code)s not found in the current transfer or already in a package."
94
+ msgstr ""
95
+
88
96
  #. module: shopfloor
89
97
  #. odoo-python
90
98
  #: code:addons/shopfloor/actions/message.py:0
@@ -2168,14 +2176,6 @@ msgstr ""
2168
2176
  msgid "Zone Picking"
2169
2177
  msgstr ""
2170
2178
 
2171
- #. module: shopfloor
2172
- #. odoo-python
2173
- #: code:addons/shopfloor/actions/message.py:0
2174
- #, python-format
2175
- msgid ""
2176
- "{message_code} not found in the current transfer or already in a package."
2177
- msgstr ""
2178
-
2179
2179
  #. module: shopfloor
2180
2180
  #. odoo-python
2181
2181
  #: code:addons/shopfloor/actions/message.py:0
@@ -37,7 +37,5 @@ def _enable_option_in_menus(menus):
37
37
  for menu in menus:
38
38
  menu.allow_alternative_destination_package = True
39
39
  _logger.info(
40
- "Option allow_alternative_destination_package enabled for menu {}".format(
41
- menu.name
42
- )
40
+ f"Option allow_alternative_destination_package enabled for menu {menu.name}"
43
41
  )
@@ -253,7 +253,8 @@ class ShopfloorMenu(models.Model):
253
253
  string="Destination package required",
254
254
  default=True,
255
255
  help="If set, the user will have to scan only the source location "
256
- "and the destination location to process a line. The unload step will be skipped.",
256
+ "and the destination location to process a line. "
257
+ "The unload step will be skipped.",
257
258
  )
258
259
 
259
260
  require_destination_package_is_possible = fields.Boolean(
@@ -548,7 +549,8 @@ class ShopfloorMenu(models.Model):
548
549
  ):
549
550
  raise exceptions.ValidationError(
550
551
  _(
551
- "Custom sort key code is required when 'Custom code' is selected."
552
+ "Custom sort key code is required "
553
+ "when 'Custom code' is selected."
552
554
  )
553
555
  )
554
556
  if (
@@ -557,7 +559,7 @@ class ShopfloorMenu(models.Model):
557
559
  ):
558
560
  raise exceptions.ValidationError(
559
561
  _(
560
- "Custom sort key code is only allowed when 'Custom code' is selected."
562
+ "Custom sort key code is only allowed when 'Custom code' is selected." # noqa
561
563
  )
562
564
  )
563
565
  code = (
@@ -20,7 +20,8 @@ class StockPicking(models.Model):
20
20
  )
21
21
  bulk_line_count = fields.Integer(
22
22
  compute="_compute_picking_info",
23
- help="Technical field. Indicates number of move lines without package included.",
23
+ help="Technical field. "
24
+ "Indicates number of move lines without package included.",
24
25
  )
25
26
 
26
27
  @api.depends(
@@ -366,7 +366,7 @@ class Checkout(Component):
366
366
  return picking.move_line_ids.filtered(self._filter_lines_unpacked)
367
367
 
368
368
  def _lines_prepare(self, picking, selected_lines):
369
- """Hook to manipulate lines' ordering or anything else before sending them back."""
369
+ """Hook to manipulate lines' ordering or anything else."""
370
370
  return selected_lines
371
371
 
372
372
  def _domain_for_list_stock_picking(self):
@@ -439,7 +439,7 @@ class Checkout(Component):
439
439
  return lines
440
440
 
441
441
  def _deselect_lines(self, lines):
442
- lines.filtered(lambda l: not l.shopfloor_checkout_done).write(
442
+ lines.filtered(lambda x: not x.shopfloor_checkout_done).write(
443
443
  {"qty_done": 0, "shopfloor_user_id": False}
444
444
  )
445
445
 
@@ -517,7 +517,7 @@ class Checkout(Component):
517
517
  self, picking, selection_lines, package, prefill_qty=0, **kw
518
518
  ):
519
519
  lines = selection_lines.filtered(
520
- lambda l: l.package_id == package and not l.shopfloor_checkout_done
520
+ lambda x: x.package_id == package and not x.shopfloor_checkout_done
521
521
  )
522
522
  if not lines:
523
523
  # No line for scanned package in selected picking
@@ -542,7 +542,7 @@ class Checkout(Component):
542
542
  picking, message=self.msg_store.scan_lot_on_product_tracked_by_lot()
543
543
  )
544
544
 
545
- lines = selection_lines.filtered(lambda l: l.product_id == product)
545
+ lines = selection_lines.filtered(lambda x: x.product_id == product)
546
546
  if not lines:
547
547
  return_picking = self._get_pickings_for_product(product, limit=1)
548
548
  if return_picking:
@@ -580,7 +580,7 @@ class Checkout(Component):
580
580
  # not in a package. But only the quantity on first selected lines
581
581
  # are updated.
582
582
  related_lines = selection_lines.filtered(
583
- lambda l: not l.package_id and l.product_id != product
583
+ lambda x: not x.package_id and x.product_id != product
584
584
  )
585
585
 
586
586
  lines = self._select_lines(
@@ -630,7 +630,7 @@ class Checkout(Component):
630
630
  # Change lot confirmed
631
631
  line = fields.first(
632
632
  selection_lines.filtered(
633
- lambda l: l.product_id == lot.product_id and l.lot_id != lot
633
+ lambda x: x.product_id == lot.product_id and x.lot_id != lot
634
634
  )
635
635
  )
636
636
  if not line:
@@ -689,7 +689,7 @@ class Checkout(Component):
689
689
 
690
690
  def _picking_lines_by_lot(self, picking, selection_lines, lot):
691
691
  """Control filtering of selected lines by given lot."""
692
- return selection_lines.filtered(lambda l: l.lot_id == lot)
692
+ return selection_lines.filtered(lambda x: x.lot_id == lot)
693
693
 
694
694
  def _change_lot_response_handler_ok(self, move_line, message=None):
695
695
  return message
@@ -698,7 +698,7 @@ class Checkout(Component):
698
698
  return message
699
699
 
700
700
  def _select_lines_from_serial(self, picking, selection_lines, lot, **kw):
701
- # Search for serial number is actually the same as searching for lot (as of v14...)
701
+ # Search for serial number is the same as searching for lot (as of v14)
702
702
  return self._select_lines_from_lot(picking, selection_lines, lot, **kw)
703
703
 
704
704
  # Handling of the destination package scanned
@@ -775,7 +775,7 @@ class Checkout(Component):
775
775
  )
776
776
 
777
777
  related_lines = selection_lines.filtered(
778
- lambda l: not l.package_id and l.product_id != move_line.product_id
778
+ lambda x: not x.package_id and x.product_id != move_line.product_id
779
779
  )
780
780
  lines = self._select_lines(move_line, related_lines=related_lines)
781
781
  return self._response_for_select_package(picking, lines)
@@ -884,7 +884,7 @@ class Checkout(Component):
884
884
  as selected
885
885
  """
886
886
  return self._change_line_qty(
887
- picking_id, selected_line_ids, [move_line_id], lambda l: l.reserved_uom_qty
887
+ picking_id, selected_line_ids, [move_line_id], lambda x: x.reserved_uom_qty
888
888
  )
889
889
 
890
890
  def set_custom_qty(self, picking_id, selected_line_ids, move_line_id, qty_done):
@@ -917,7 +917,7 @@ class Checkout(Component):
917
917
  picking.id,
918
918
  selected_lines.ids,
919
919
  switch_lines.ids,
920
- lambda l: l.reserved_uom_qty,
920
+ lambda x: x.reserved_uom_qty,
921
921
  )
922
922
 
923
923
  def _increment_custom_qty(
@@ -1117,7 +1117,7 @@ class Checkout(Component):
1117
1117
  selected_lines,
1118
1118
  message=self.msg_store.scan_lot_on_product_tracked_by_lot(),
1119
1119
  )
1120
- product_lines = selected_lines.filtered(lambda l: l.product_id == product)
1120
+ product_lines = selected_lines.filtered(lambda x: x.product_id == product)
1121
1121
  if self.work.menu.no_prefill_qty:
1122
1122
  quantity_increment = packaging.qty if packaging else 1
1123
1123
  return self._increment_custom_qty(
@@ -1136,7 +1136,7 @@ class Checkout(Component):
1136
1136
  )
1137
1137
 
1138
1138
  def _scan_package_action_from_lot(self, picking, selected_lines, lot, **kw):
1139
- lot_lines = selected_lines.filtered(lambda l: l.lot_id == lot)
1139
+ lot_lines = selected_lines.filtered(lambda x: x.lot_id == lot)
1140
1140
  if self.work.menu.no_prefill_qty:
1141
1141
  return self._increment_custom_qty(
1142
1142
  picking, selected_lines, self._find_line_to_increment(lot_lines), 1
@@ -1144,7 +1144,7 @@ class Checkout(Component):
1144
1144
  return self._switch_line_qty_done(picking, selected_lines, lot_lines)
1145
1145
 
1146
1146
  def _scan_package_action_from_serial(self, picking, selection_lines, lot, **kw):
1147
- # Search for serial number is actually the same as searching for lot (as of v14...)
1147
+ # Search serial number is actually the same as searching for lot (as of v14...)
1148
1148
  return self._scan_package_action_from_lot(picking, selection_lines, lot, **kw)
1149
1149
 
1150
1150
  def _scan_package_action_from_package(self, picking, selected_lines, package, **kw):
@@ -1482,8 +1482,8 @@ class Checkout(Component):
1482
1482
 
1483
1483
  if package:
1484
1484
  move_lines = picking.move_line_ids.filtered(
1485
- lambda l: self._filter_lines_checkout_done(l)
1486
- and l.result_package_id == package
1485
+ lambda x: self._filter_lines_checkout_done(x)
1486
+ and x.result_package_id == package
1487
1487
  )
1488
1488
  for move_line in move_lines:
1489
1489
  move_line.write(
@@ -364,13 +364,13 @@ class ClusterPicking(Component):
364
364
  def _lines_to_pick(self, picking_batch):
365
365
  return self._lines_for_picking_batch(
366
366
  picking_batch,
367
- filter_func=lambda l: (
368
- l.state in ("assigned", "partially_available")
367
+ filter_func=lambda x: (
368
+ x.state in ("assigned", "partially_available")
369
369
  # On 'StockPicking.action_assign()', result_package_id is set to
370
370
  # the same package as 'package_id'. Here, we need to exclude lines
371
371
  # that were already put into a bin, i.e. the destination package
372
372
  # is different.
373
- and (not l.result_package_id or l.result_package_id == l.package_id)
373
+ and (not x.result_package_id or x.result_package_id == x.package_id)
374
374
  ),
375
375
  )
376
376
 
@@ -378,11 +378,11 @@ class ClusterPicking(Component):
378
378
  """Get the last line picked and put in a pack for this picking"""
379
379
  return fields.first(
380
380
  picking.move_line_ids.filtered(
381
- lambda l: l.qty_done > 0
382
- and l.result_package_id
381
+ lambda x: x.qty_done > 0
382
+ and x.result_package_id
383
383
  # if we are moving the entire package, we shouldn't
384
384
  # add stuff inside it, it's not a new package
385
- and l.package_id != l.result_package_id
385
+ and x.package_id != x.result_package_id
386
386
  ).sorted(key="write_date", reverse=True)
387
387
  )
388
388
 
@@ -582,7 +582,7 @@ class ClusterPicking(Component):
582
582
  def _scan_line_by_packaging(self, picking, move_line, packaging, sublocation):
583
583
  """Packaging scanned, check if we can work with it.
584
584
 
585
- If the packaging related product is part of several packages in the same location,
585
+ If the packaging product is part of several packages in the same location,
586
586
  we can't be sure it's the correct one, in such case, ask to scan a package
587
587
  """
588
588
  response = self._check_first_scan_location_or_pack_first(move_line, sublocation)
@@ -595,7 +595,7 @@ class ClusterPicking(Component):
595
595
  move_line, message=self.msg_store.scan_lot_on_product_tracked_by_lot()
596
596
  )
597
597
  other_product_lines = picking.move_line_ids.filtered(
598
- lambda l: l.product_id == product and l.location_id == move_line.location_id
598
+ lambda x: x.product_id == product and x.location_id == move_line.location_id
599
599
  )
600
600
  packages = other_product_lines.mapped("package_id")
601
601
  # Do not use mapped here: we want to see if we have more than one package,
@@ -1149,7 +1149,7 @@ class ClusterPicking(Component):
1149
1149
  lines.write({"shopfloor_unloaded": True, "location_dest_id": location.id})
1150
1150
  lines.package_level_id.location_dest_id = location
1151
1151
  for picking in lines.batch_id.picking_ids:
1152
- picking_lines = lines.filtered(lambda l, p=picking: l.picking_id == p)
1152
+ picking_lines = lines.filtered(lambda x, p=picking: x.picking_id == p)
1153
1153
  self._unload_set_picking_to_done(picking, picking_lines)
1154
1154
 
1155
1155
  def _unload_set_picking_to_done(self, picking, picking_lines):
@@ -1274,7 +1274,7 @@ class ClusterPicking(Component):
1274
1274
 
1275
1275
  # we work only on the lines of the scanned package
1276
1276
  lines = self._lines_to_unload(batch).filtered(
1277
- lambda l: l.result_package_id == package
1277
+ lambda x: x.result_package_id == package
1278
1278
  )
1279
1279
  if not lines:
1280
1280
  return self._unload_end(batch)