odoo-addon-shopfloor 16.0.2.4.2.4__py3-none-any.whl → 16.0.2.5.0__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- odoo/addons/shopfloor/README.rst +1 -1
- odoo/addons/shopfloor/__manifest__.py +1 -1
- odoo/addons/shopfloor/actions/change_package_lot.py +11 -0
- odoo/addons/shopfloor/actions/message.py +37 -0
- odoo/addons/shopfloor/i18n/it.po +9 -3
- odoo/addons/shopfloor/i18n/shopfloor.pot +33 -2
- odoo/addons/shopfloor/services/checkout.py +93 -15
- odoo/addons/shopfloor/static/description/index.html +1 -1
- odoo/addons/shopfloor/tests/test_checkout_base.py +1 -0
- odoo/addons/shopfloor/tests/test_checkout_scan_line.py +41 -4
- {odoo_addon_shopfloor-16.0.2.4.2.4.dist-info → odoo_addon_shopfloor-16.0.2.5.0.dist-info}/METADATA +2 -2
- {odoo_addon_shopfloor-16.0.2.4.2.4.dist-info → odoo_addon_shopfloor-16.0.2.5.0.dist-info}/RECORD +14 -14
- {odoo_addon_shopfloor-16.0.2.4.2.4.dist-info → odoo_addon_shopfloor-16.0.2.5.0.dist-info}/WHEEL +0 -0
- {odoo_addon_shopfloor-16.0.2.4.2.4.dist-info → odoo_addon_shopfloor-16.0.2.5.0.dist-info}/top_level.txt +0 -0
odoo/addons/shopfloor/README.rst
CHANGED
@@ -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:
|
10
|
+
!! source digest: sha256:86239aacdfa7d7810aca5b0625ebd9112b12385d98899ac696d596b455b0c57d
|
11
11
|
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
|
12
12
|
|
13
13
|
.. |badge1| image:: https://img.shields.io/badge/maturity-Beta-yellow.png
|
@@ -162,3 +162,14 @@ class ChangePackageLot(Component):
|
|
162
162
|
else:
|
163
163
|
message = self.msg_store.units_replaced_by_package(package)
|
164
164
|
return response_ok_func(move_line, message=message)
|
165
|
+
|
166
|
+
def filter_lines_allowed_to_change_lot(self, move_lines, lot):
|
167
|
+
"""Filter move lines allowed to change their lot.
|
168
|
+
|
169
|
+
We cannot change a lot on a move having ancestors. That would mean we
|
170
|
+
already picked up the wrong lot on the previous move(s) and Odoo already
|
171
|
+
restricts the reservation based on the previous move(s).
|
172
|
+
"""
|
173
|
+
return move_lines.filtered(
|
174
|
+
lambda l: (l.product_id == lot.product_id and not l.move_id.move_orig_ids)
|
175
|
+
)
|
@@ -109,6 +109,16 @@ class MessageAction(Component):
|
|
109
109
|
),
|
110
110
|
}
|
111
111
|
|
112
|
+
def lot_different_change(self):
|
113
|
+
return {
|
114
|
+
"message_type": "warning",
|
115
|
+
"body": _(
|
116
|
+
"You scanned a different lot with the same product, "
|
117
|
+
"do you want to change lot? Scan it again to confirm. "
|
118
|
+
"The first line matching this product will be updated. "
|
119
|
+
),
|
120
|
+
}
|
121
|
+
|
112
122
|
def package_not_available_in_picking(self, package, picking):
|
113
123
|
return {
|
114
124
|
"message_type": "warning",
|
@@ -537,6 +547,12 @@ class MessageAction(Component):
|
|
537
547
|
"body": _("This lot is part of multiple packages, please scan a package."),
|
538
548
|
}
|
539
549
|
|
550
|
+
def lot_not_found(self):
|
551
|
+
return {
|
552
|
+
"message_type": "error",
|
553
|
+
"body": _("This lot does not exist anymore."),
|
554
|
+
}
|
555
|
+
|
540
556
|
def lot_not_found_in_pickings(self):
|
541
557
|
return {
|
542
558
|
"message_type": "warning",
|
@@ -945,3 +961,24 @@ class MessageAction(Component):
|
|
945
961
|
"please scan a location instead."
|
946
962
|
),
|
947
963
|
}
|
964
|
+
|
965
|
+
def lot_changed(self):
|
966
|
+
return {
|
967
|
+
"message_type": "info",
|
968
|
+
"body": _("Lot changed"),
|
969
|
+
}
|
970
|
+
|
971
|
+
def lot_change_wrong_lot(self, lot_name):
|
972
|
+
return {
|
973
|
+
"message_type": "error",
|
974
|
+
"body": _("Scanned lot differs from the previous scan: %(lot)s.")
|
975
|
+
% {
|
976
|
+
"lot": lot_name,
|
977
|
+
},
|
978
|
+
}
|
979
|
+
|
980
|
+
def lot_change_no_line_found(self):
|
981
|
+
return {
|
982
|
+
"message_type": "error",
|
983
|
+
"body": _("Unable to find a line with the same product but different lot."),
|
984
|
+
}
|
odoo/addons/shopfloor/i18n/it.po
CHANGED
@@ -6,7 +6,7 @@ msgid ""
|
|
6
6
|
msgstr ""
|
7
7
|
"Project-Id-Version: Odoo Server 14.0\n"
|
8
8
|
"Report-Msgid-Bugs-To: \n"
|
9
|
-
"PO-Revision-Date:
|
9
|
+
"PO-Revision-Date: 2025-01-16 10:06+0000\n"
|
10
10
|
"Last-Translator: mymage <stefano.consolaro@mymage.it>\n"
|
11
11
|
"Language-Team: none\n"
|
12
12
|
"Language: it\n"
|
@@ -152,6 +152,9 @@ msgid ""
|
|
152
152
|
"same time','Unload package at destination' and 'Multiple moves same "
|
153
153
|
"destination package'."
|
154
154
|
msgstr ""
|
155
|
+
"'Nessun collo di destinazione richiesto' non è compatibile con 'Preleva e "
|
156
|
+
"imballa contemporaneamente', 'Scarica il collo a destinazione' e 'Più "
|
157
|
+
"movimenti con lo stesso collo di destinazione'."
|
155
158
|
|
156
159
|
#. module: shopfloor
|
157
160
|
#. odoo-python
|
@@ -494,7 +497,7 @@ msgstr "Collo destinazione"
|
|
494
497
|
#. module: shopfloor
|
495
498
|
#: model:ir.model.fields,field_description:shopfloor.field_shopfloor_menu__require_destination_package
|
496
499
|
msgid "Destination package required"
|
497
|
-
msgstr ""
|
500
|
+
msgstr "Richiesto collo destinazione"
|
498
501
|
|
499
502
|
#. module: shopfloor
|
500
503
|
#: model:ir.model.fields,field_description:shopfloor.field_shopfloor_menu__disable_full_bin_action_is_possible
|
@@ -555,6 +558,9 @@ msgid ""
|
|
555
558
|
"If set, the user will have to scan only the source location and the "
|
556
559
|
"destination location to process a line. The unload step will be skipped."
|
557
560
|
msgstr ""
|
561
|
+
"Se impostato, l'utente dovrà scansionare solo la posizione di origine e la "
|
562
|
+
"posizione di destinazione per elaborare una riga. La fase di scarico verrà "
|
563
|
+
"saltata."
|
558
564
|
|
559
565
|
#. module: shopfloor
|
560
566
|
#: model:ir.model.fields,help:shopfloor.field_shopfloor_menu__ignore_no_putaway_available
|
@@ -1389,7 +1395,7 @@ msgstr "Prodotti grezzi esidui non in colli, procedere ugualmente?"
|
|
1389
1395
|
#. module: shopfloor
|
1390
1396
|
#: model:ir.model.fields,field_description:shopfloor.field_shopfloor_menu__require_destination_package_is_possible
|
1391
1397
|
msgid "Require Destination Package Is Possible"
|
1392
|
-
msgstr ""
|
1398
|
+
msgstr "È possibile richiedere il collo di destinazione"
|
1393
1399
|
|
1394
1400
|
#. module: shopfloor
|
1395
1401
|
#: model:ir.model.fields,field_description:shopfloor.field_stock_location__reserved_move_line_ids
|
@@ -609,9 +609,9 @@ msgstr ""
|
|
609
609
|
|
610
610
|
#. module: shopfloor
|
611
611
|
#. odoo-python
|
612
|
-
#: code:addons/shopfloor/
|
612
|
+
#: code:addons/shopfloor/actions/message.py:0
|
613
613
|
#, python-format
|
614
|
-
msgid "Lot
|
614
|
+
msgid "Lot changed"
|
615
615
|
msgstr ""
|
616
616
|
|
617
617
|
#. module: shopfloor
|
@@ -1348,6 +1348,13 @@ msgstr ""
|
|
1348
1348
|
msgid "Scan the package"
|
1349
1349
|
msgstr ""
|
1350
1350
|
|
1351
|
+
#. module: shopfloor
|
1352
|
+
#. odoo-python
|
1353
|
+
#: code:addons/shopfloor/actions/message.py:0
|
1354
|
+
#, python-format
|
1355
|
+
msgid "Scanned lot differs from the previous scan: %(lot)s."
|
1356
|
+
msgstr ""
|
1357
|
+
|
1351
1358
|
#. module: shopfloor
|
1352
1359
|
#. odoo-python
|
1353
1360
|
#: code:addons/shopfloor/models/shopfloor_menu.py:0
|
@@ -1778,6 +1785,13 @@ msgstr ""
|
|
1778
1785
|
msgid "This location requires packages. Please scan a destination package."
|
1779
1786
|
msgstr ""
|
1780
1787
|
|
1788
|
+
#. module: shopfloor
|
1789
|
+
#. odoo-python
|
1790
|
+
#: code:addons/shopfloor/actions/message.py:0
|
1791
|
+
#, python-format
|
1792
|
+
msgid "This lot does not exist anymore."
|
1793
|
+
msgstr ""
|
1794
|
+
|
1781
1795
|
#. module: shopfloor
|
1782
1796
|
#. odoo-python
|
1783
1797
|
#: code:addons/shopfloor/actions/message.py:0
|
@@ -1906,6 +1920,13 @@ msgid ""
|
|
1906
1920
|
"instead."
|
1907
1921
|
msgstr ""
|
1908
1922
|
|
1923
|
+
#. module: shopfloor
|
1924
|
+
#. odoo-python
|
1925
|
+
#: code:addons/shopfloor/actions/message.py:0
|
1926
|
+
#, python-format
|
1927
|
+
msgid "Unable to find a line with the same product but different lot."
|
1928
|
+
msgstr ""
|
1929
|
+
|
1909
1930
|
#. module: shopfloor
|
1910
1931
|
#. odoo-python
|
1911
1932
|
#: code:addons/shopfloor/actions/message.py:0
|
@@ -2099,6 +2120,16 @@ msgstr ""
|
|
2099
2120
|
msgid "You must not pick more than {} units."
|
2100
2121
|
msgstr ""
|
2101
2122
|
|
2123
|
+
#. module: shopfloor
|
2124
|
+
#. odoo-python
|
2125
|
+
#: code:addons/shopfloor/actions/message.py:0
|
2126
|
+
#, python-format
|
2127
|
+
msgid ""
|
2128
|
+
"You scanned a different lot with the same product, do you want to change "
|
2129
|
+
"lot? Scan it again to confirm. The first line matching this product will be "
|
2130
|
+
"updated. "
|
2131
|
+
msgstr ""
|
2132
|
+
|
2102
2133
|
#. module: shopfloor
|
2103
2134
|
#. odoo-python
|
2104
2135
|
#: code:addons/shopfloor/actions/message.py:0
|
@@ -41,24 +41,29 @@ class Checkout(Component):
|
|
41
41
|
_description = __doc__
|
42
42
|
|
43
43
|
def _response_for_select_line(
|
44
|
-
self, picking, message=None, need_confirm_pack_all=""
|
44
|
+
self, picking, message=None, need_confirm_pack_all="", need_confirm_lot=None
|
45
45
|
):
|
46
46
|
if all(line.shopfloor_checkout_done for line in picking.move_line_ids):
|
47
47
|
return self._response_for_summary(picking, message=message)
|
48
48
|
return self._response(
|
49
49
|
next_state="select_line",
|
50
50
|
data=self._data_for_select_line(
|
51
|
-
picking,
|
51
|
+
picking,
|
52
|
+
need_confirm_pack_all=need_confirm_pack_all,
|
53
|
+
need_confirm_lot=need_confirm_lot,
|
52
54
|
),
|
53
55
|
message=message,
|
54
56
|
)
|
55
57
|
|
56
|
-
def _data_for_select_line(
|
58
|
+
def _data_for_select_line(
|
59
|
+
self, picking, need_confirm_pack_all="", need_confirm_lot=None
|
60
|
+
):
|
57
61
|
return {
|
58
62
|
"picking": self._data_for_stock_picking(picking),
|
59
63
|
"group_lines_by_location": True,
|
60
64
|
"show_oneline_package_content": self.work.menu.show_oneline_package_content,
|
61
65
|
"need_confirm_pack_all": need_confirm_pack_all,
|
66
|
+
"need_confirm_lot": need_confirm_lot,
|
62
67
|
}
|
63
68
|
|
64
69
|
def _response_for_summary(self, picking, need_confirm=False, message=None):
|
@@ -425,7 +430,7 @@ class Checkout(Component):
|
|
425
430
|
{"qty_done": 0, "shopfloor_user_id": False}
|
426
431
|
)
|
427
432
|
|
428
|
-
def scan_line(self, picking_id, barcode, confirm_pack_all=None):
|
433
|
+
def scan_line(self, picking_id, barcode, confirm_pack_all=False, confirm_lot=None):
|
429
434
|
"""Scan move lines of the stock picking
|
430
435
|
|
431
436
|
It allows to select move lines of the stock picking for the next
|
@@ -457,7 +462,7 @@ class Checkout(Component):
|
|
457
462
|
# Search of the destination package
|
458
463
|
search_result = self._scan_line_find(picking, barcode)
|
459
464
|
result_handler = getattr(self, "_select_lines_from_" + search_result.type)
|
460
|
-
kw = {"confirm_pack_all": confirm_pack_all}
|
465
|
+
kw = {"confirm_pack_all": confirm_pack_all, "confirm_lot": confirm_lot}
|
461
466
|
return result_handler(picking, selection_lines, search_result.record, **kw)
|
462
467
|
|
463
468
|
def _scan_line_find(self, picking, barcode, search_types=None):
|
@@ -509,6 +514,7 @@ class Checkout(Component):
|
|
509
514
|
def _select_lines_from_product(
|
510
515
|
self, picking, selection_lines, product, prefill_qty=1, check_lot=True, **kw
|
511
516
|
):
|
517
|
+
# TODO: should we propagate 'kw.get("message")' content on each return?
|
512
518
|
if product.tracking in ("lot", "serial") and check_lot:
|
513
519
|
return self._response_for_select_line(
|
514
520
|
picking, message=self.msg_store.scan_lot_on_product_tracked_by_lot()
|
@@ -538,7 +544,11 @@ class Checkout(Component):
|
|
538
544
|
# Select all the lines of the package when we scan a product in a
|
539
545
|
# package and we have only one.
|
540
546
|
return self._select_lines_from_package(
|
541
|
-
picking,
|
547
|
+
picking,
|
548
|
+
selection_lines,
|
549
|
+
packages,
|
550
|
+
prefill_qty=prefill_qty,
|
551
|
+
message=kw.get("message"),
|
542
552
|
)
|
543
553
|
else:
|
544
554
|
# There is no package on selected lines, so also select all other lines
|
@@ -551,7 +561,9 @@ class Checkout(Component):
|
|
551
561
|
lines = self._select_lines(
|
552
562
|
lines, prefill_qty=prefill_qty, related_lines=related_lines
|
553
563
|
)
|
554
|
-
return self._response_for_select_package(
|
564
|
+
return self._response_for_select_package(
|
565
|
+
picking, lines, message=kw.get("message")
|
566
|
+
)
|
555
567
|
|
556
568
|
def _select_lines_from_packaging(self, picking, selection_lines, packaging, **kw):
|
557
569
|
return self._select_lines_from_product(
|
@@ -561,15 +573,58 @@ class Checkout(Component):
|
|
561
573
|
def _select_lines_from_lot(
|
562
574
|
self, picking, selection_lines, lot, prefill_qty=1, **kw
|
563
575
|
):
|
564
|
-
|
576
|
+
message = None
|
577
|
+
lines = self._picking_lines_by_lot(picking, selection_lines, lot)
|
565
578
|
if not lines:
|
566
|
-
|
567
|
-
|
568
|
-
|
569
|
-
|
570
|
-
|
571
|
-
|
579
|
+
change_package_lot = self._actions_for("change.package.lot")
|
580
|
+
if not kw.get("confirm_lot"):
|
581
|
+
lines_same_product = (
|
582
|
+
change_package_lot.filter_lines_allowed_to_change_lot(
|
583
|
+
selection_lines, lot
|
584
|
+
)
|
585
|
+
)
|
586
|
+
# If there's at least one product matching we are good to go.
|
587
|
+
# In any case, only the 1st line matching will be affected.
|
588
|
+
if lines_same_product:
|
589
|
+
return self._response_for_select_line(
|
590
|
+
picking,
|
591
|
+
message=self.msg_store.lot_different_change(),
|
592
|
+
need_confirm_lot=lot.id,
|
593
|
+
)
|
594
|
+
return self._response_for_select_line(
|
595
|
+
picking,
|
596
|
+
message=self.msg_store.lot_not_found_in_picking(lot, picking),
|
597
|
+
)
|
598
|
+
# Validate the scanned lot against the previous one
|
599
|
+
if lot.id != kw["confirm_lot"]:
|
600
|
+
expected_lot = lot.browse(kw["confirm_lot"]).exists()
|
601
|
+
return self._response_for_select_line(
|
602
|
+
picking,
|
603
|
+
message=self.msg_store.lot_change_wrong_lot(expected_lot.name),
|
604
|
+
)
|
605
|
+
# Change lot confirmed
|
606
|
+
line = fields.first(
|
607
|
+
selection_lines.filtered(
|
608
|
+
lambda l: l.product_id == lot.product_id and l.lot_id != lot
|
609
|
+
)
|
610
|
+
)
|
611
|
+
if not line:
|
612
|
+
return self._response_for_select_line(
|
613
|
+
picking,
|
614
|
+
message=self.msg_store.lot_change_no_line_found(),
|
615
|
+
)
|
616
|
+
response_ok_func = self._change_lot_response_handler_ok
|
617
|
+
response_error_func = self._change_lot_response_handler_error
|
618
|
+
message = change_package_lot.change_lot(
|
619
|
+
line, lot, response_ok_func, response_error_func
|
572
620
|
)
|
621
|
+
if message["message_type"] == "error":
|
622
|
+
return self._response_for_select_line(picking, message=message)
|
623
|
+
else:
|
624
|
+
lines = line
|
625
|
+
# Some lines have been recreated, refresh the recordset
|
626
|
+
# to avoid CacheMiss error
|
627
|
+
selection_lines = self._lines_to_pack(picking)
|
573
628
|
|
574
629
|
# When lots are as units outside of packages, we can select them for
|
575
630
|
# packing, but if they are in a package, we want the user to scan the packages.
|
@@ -580,6 +635,8 @@ class Checkout(Component):
|
|
580
635
|
# package, but also if we have one lot as a package and the same lot as
|
581
636
|
# a unit in another line. In both cases, we want the user to scan the
|
582
637
|
# package.
|
638
|
+
# NOTE: change_pack_lot already checked this, so if we changed the lot
|
639
|
+
# we are already safe.
|
583
640
|
if packages and len({line.package_id for line in lines}) > 1:
|
584
641
|
return self._response_for_select_line(
|
585
642
|
picking, message=self.msg_store.lot_multiple_packages_scan_package()
|
@@ -588,7 +645,11 @@ class Checkout(Component):
|
|
588
645
|
# Select all the lines of the package when we scan a lot in a
|
589
646
|
# package and we have only one.
|
590
647
|
return self._select_lines_from_package(
|
591
|
-
picking,
|
648
|
+
picking,
|
649
|
+
selection_lines,
|
650
|
+
packages,
|
651
|
+
prefill_qty=prefill_qty,
|
652
|
+
message=message,
|
592
653
|
)
|
593
654
|
|
594
655
|
first_allowed_line = fields.first(lines)
|
@@ -598,8 +659,19 @@ class Checkout(Component):
|
|
598
659
|
first_allowed_line.product_id,
|
599
660
|
prefill_qty=prefill_qty,
|
600
661
|
check_lot=False,
|
662
|
+
message=message,
|
601
663
|
)
|
602
664
|
|
665
|
+
def _picking_lines_by_lot(self, picking, selection_lines, lot):
|
666
|
+
"""Control filtering of selected lines by given lot."""
|
667
|
+
return selection_lines.filtered(lambda l: l.lot_id == lot)
|
668
|
+
|
669
|
+
def _change_lot_response_handler_ok(self, move_line, message=None):
|
670
|
+
return message
|
671
|
+
|
672
|
+
def _change_lot_response_handler_error(self, move_line, message=None):
|
673
|
+
return message
|
674
|
+
|
603
675
|
def _select_lines_from_serial(self, picking, selection_lines, lot, **kw):
|
604
676
|
# Search for serial number is actually the same as searching for lot (as of v14...)
|
605
677
|
return self._select_lines_from_lot(picking, selection_lines, lot, **kw)
|
@@ -1514,6 +1586,11 @@ class ShopfloorCheckoutValidator(Component):
|
|
1514
1586
|
"nullable": True,
|
1515
1587
|
"required": False,
|
1516
1588
|
},
|
1589
|
+
"confirm_lot": {
|
1590
|
+
"type": "integer",
|
1591
|
+
"nullable": True,
|
1592
|
+
"required": False,
|
1593
|
+
},
|
1517
1594
|
}
|
1518
1595
|
|
1519
1596
|
def select_line(self):
|
@@ -1749,6 +1826,7 @@ class ShopfloorCheckoutValidatorResponse(Component):
|
|
1749
1826
|
group_lines_by_location={"type": "boolean"},
|
1750
1827
|
show_oneline_package_content={"type": "boolean"},
|
1751
1828
|
need_confirm_pack_all={"type": "string"},
|
1829
|
+
need_confirm_lot={"type": "integer", "nullable": True},
|
1752
1830
|
)
|
1753
1831
|
|
1754
1832
|
@property
|
@@ -367,7 +367,7 @@ 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:86239aacdfa7d7810aca5b0625ebd9112b12385d98899ac696d596b455b0c57d
|
371
371
|
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -->
|
372
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/wms/tree/16.0/shopfloor"><img alt="OCA/wms" src="https://img.shields.io/badge/github-OCA%2Fwms-lightgray.png?logo=github" /></a> <a class="reference external image-reference" href="https://translation.odoo-community.org/projects/wms-16-0/wms-16-0-shopfloor"><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/wms&target_branch=16.0"><img alt="Try me on Runboat" src="https://img.shields.io/badge/runboat-Try%20me-875A7B.png" /></a></p>
|
373
373
|
<p>Shopfloor is a barcode scanner application for internal warehouse operations.</p>
|
@@ -1,5 +1,6 @@
|
|
1
1
|
# Copyright 2020 Camptocamp SA (http://www.camptocamp.com)
|
2
2
|
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
|
3
|
+
|
3
4
|
from .test_checkout_scan_line_base import CheckoutScanLineCaseBase
|
4
5
|
|
5
6
|
|
@@ -133,7 +134,7 @@ class CheckoutScanLineCase(CheckoutScanLineCaseBase):
|
|
133
134
|
# more than one package, it would be an error.
|
134
135
|
self._test_scan_line_ok(self.product_a.barcode, picking.move_line_ids)
|
135
136
|
|
136
|
-
def _test_scan_line_error(self, picking, barcode, message):
|
137
|
+
def _test_scan_line_error(self, picking, barcode, message, need_confirm_lot=None):
|
137
138
|
"""Test errors for /scan_line
|
138
139
|
|
139
140
|
:param picking: the picking we are currently working with (selected)
|
@@ -146,7 +147,9 @@ class CheckoutScanLineCase(CheckoutScanLineCaseBase):
|
|
146
147
|
self.assert_response(
|
147
148
|
response,
|
148
149
|
next_state="select_line",
|
149
|
-
data=
|
150
|
+
data=dict(
|
151
|
+
self._data_for_select_line(picking), need_confirm_lot=need_confirm_lot
|
152
|
+
),
|
150
153
|
message=message,
|
151
154
|
)
|
152
155
|
|
@@ -248,17 +251,51 @@ class CheckoutScanLineCase(CheckoutScanLineCaseBase):
|
|
248
251
|
},
|
249
252
|
)
|
250
253
|
|
251
|
-
def
|
254
|
+
def test_scan_line_error_lot_different_change_success(self):
|
255
|
+
"""Scan the wrong lot while a line with the same product exists."""
|
252
256
|
picking = self._create_picking(lines=[(self.product_a, 10)])
|
253
257
|
self._fill_stock_for_moves(picking.move_ids, in_lot=True)
|
254
258
|
picking.action_assign()
|
259
|
+
previous_lot = picking.move_line_ids.lot_id
|
260
|
+
# Create a lot that is registered in the location we are working on
|
255
261
|
lot = self.env["stock.lot"].create(
|
256
262
|
{"product_id": self.product_a.id, "company_id": self.env.company.id}
|
257
263
|
)
|
264
|
+
self._update_qty_in_location(
|
265
|
+
picking.move_line_ids.location_id, self.product_a, 10, lot=lot
|
266
|
+
)
|
258
267
|
self._test_scan_line_error(
|
259
268
|
picking,
|
260
269
|
lot.name,
|
261
|
-
|
270
|
+
self.msg_store.lot_different_change(),
|
271
|
+
need_confirm_lot=lot.id,
|
272
|
+
)
|
273
|
+
# Second scan to confirm the change of lot
|
274
|
+
response = self.service.dispatch(
|
275
|
+
"scan_line",
|
276
|
+
params={
|
277
|
+
"picking_id": picking.id,
|
278
|
+
"barcode": lot.name,
|
279
|
+
"confirm_lot": lot.id,
|
280
|
+
},
|
281
|
+
)
|
282
|
+
message = self.msg_store.lot_replaced_by_lot(previous_lot, lot)
|
283
|
+
message["body"] = f"{message['body']}"
|
284
|
+
self.assert_response(
|
285
|
+
response,
|
286
|
+
next_state="select_package",
|
287
|
+
data={
|
288
|
+
"selected_move_lines": [
|
289
|
+
self._move_line_data(ml) for ml in picking.move_line_ids
|
290
|
+
],
|
291
|
+
"package_allowed": True,
|
292
|
+
"picking": self.service.data.picking(picking),
|
293
|
+
"packing_info": self.service._data_for_packing_info(picking),
|
294
|
+
"no_package_enabled": not self.service.options.get(
|
295
|
+
"checkout__disable_no_package"
|
296
|
+
),
|
297
|
+
},
|
298
|
+
message=message,
|
262
299
|
)
|
263
300
|
|
264
301
|
def test_scan_line_error_lot_in_two_packages(self):
|
{odoo_addon_shopfloor-16.0.2.4.2.4.dist-info → odoo_addon_shopfloor-16.0.2.5.0.dist-info}/METADATA
RENAMED
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.1
|
2
2
|
Name: odoo-addon-shopfloor
|
3
|
-
Version: 16.0.2.
|
3
|
+
Version: 16.0.2.5.0
|
4
4
|
Summary: manage warehouse operations with barcode scanners
|
5
5
|
Home-page: https://github.com/OCA/wms
|
6
6
|
Author: Camptocamp, BCIM, Akretion, Odoo Community Association (OCA)
|
@@ -36,7 +36,7 @@ Shopfloor
|
|
36
36
|
!! This file is generated by oca-gen-addon-readme !!
|
37
37
|
!! changes will be overwritten. !!
|
38
38
|
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
|
39
|
-
!! source digest: sha256:
|
39
|
+
!! source digest: sha256:86239aacdfa7d7810aca5b0625ebd9112b12385d98899ac696d596b455b0c57d
|
40
40
|
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
|
41
41
|
|
42
42
|
.. |badge1| image:: https://img.shields.io/badge/maturity-Beta-yellow.png
|
{odoo_addon_shopfloor-16.0.2.4.2.4.dist-info → odoo_addon_shopfloor-16.0.2.5.0.dist-info}/RECORD
RENAMED
@@ -1,16 +1,16 @@
|
|
1
|
-
odoo/addons/shopfloor/README.rst,sha256=
|
1
|
+
odoo/addons/shopfloor/README.rst,sha256=ABVzU954zlAGxtjdMbnky8zuB3EvFs29Q2cyxBfRYB8,5318
|
2
2
|
odoo/addons/shopfloor/__init__.py,sha256=ke3RmZ7XkX-lz4S8NHAxNIEJ5_Nvj5bjBAqD-W-q73c,91
|
3
|
-
odoo/addons/shopfloor/__manifest__.py,sha256=
|
3
|
+
odoo/addons/shopfloor/__manifest__.py,sha256=pVpAMjaFsljMLhAcIlbsTkgoN1WoPPMGTAQl6i_OhV0,2245
|
4
4
|
odoo/addons/shopfloor/exceptions.py,sha256=81KpIGVkuYRhA0cIuml4pg4G3izqkAAhLqoXZbUd4X8,197
|
5
5
|
odoo/addons/shopfloor/utils.py,sha256=Be7J8Tu7ivOW4lpe8IjKxwqfTwfmK-ZkeFEavoYIIF4,375
|
6
6
|
odoo/addons/shopfloor/actions/__init__.py,sha256=_yTf-NtaJmSylBJIoJJvKNYEI-wlqpyRw-S5eJRRzEM,400
|
7
|
-
odoo/addons/shopfloor/actions/change_package_lot.py,sha256
|
7
|
+
odoo/addons/shopfloor/actions/change_package_lot.py,sha256=5ptgBQ_MxEyHjRrgoaaxiZtbsNL3tuoC6XUuYriJYFk,7225
|
8
8
|
odoo/addons/shopfloor/actions/completion_info.py,sha256=Q_wlx8VJHOPFZbwGrxHBYa-gt04ZAXBsRBGh0aLuRrk,1483
|
9
9
|
odoo/addons/shopfloor/actions/data.py,sha256=ASj6VdLrkzJD6jTWsbKQ4LNZ_x2NU4BaXH_FA9RJvJQ,12846
|
10
10
|
odoo/addons/shopfloor/actions/data_detail.py,sha256=eVW5oOpl5Tkwkpb0he0Xj_PHLRS8LkOa5VOI2w5R2Zo,8752
|
11
11
|
odoo/addons/shopfloor/actions/inventory.py,sha256=Slg1hcV-kMb1jWHHu0VmYvQ9C0uqXtUAwAmHJUTE1zo,5976
|
12
12
|
odoo/addons/shopfloor/actions/location_content_transfer_sorter.py,sha256=xpzea-w4zFrmpudQK3omRpZVhJdEIVQLXnuImkaZf5A,3110
|
13
|
-
odoo/addons/shopfloor/actions/message.py,sha256=
|
13
|
+
odoo/addons/shopfloor/actions/message.py,sha256=SjSQJLsD8x83r8xpfhRVAPiinb2fdJqeqXQZaphteT0,31356
|
14
14
|
odoo/addons/shopfloor/actions/move_line_search.py,sha256=2G2NkxQ__JlvlhTQv8CQT1Kh94BDm49APTwbh_Hr-ZA,7795
|
15
15
|
odoo/addons/shopfloor/actions/packaging.py,sha256=uZxD1bisNS_8M5ZQAHuOz2MR6l26XHR4VZY7QgA69Zs,2662
|
16
16
|
odoo/addons/shopfloor/actions/savepoint.py,sha256=Tmqgh1k16x7L0ZSxVz9yNqIGLAyA7vFb5FWpLrb_GTI,1151
|
@@ -46,9 +46,9 @@ odoo/addons/shopfloor/docs/zone_picking_diag_seq.png,sha256=_qGnbfsShydA3Xjefaur
|
|
46
46
|
odoo/addons/shopfloor/i18n/ca.po,sha256=2vRFtRVfHUIrxUX3Z6w8IeyNkTzrfE5caE9td1M6wpc,60111
|
47
47
|
odoo/addons/shopfloor/i18n/de.po,sha256=48tW5tgkPNQI35u4yr6MeY898EgLIsWj2WltfoFWUCw,58579
|
48
48
|
odoo/addons/shopfloor/i18n/es_AR.po,sha256=nWyH3YYSJtdcZWEzvoKiTfqfLTFAb2pA0jIWspMqUtU,81019
|
49
|
-
odoo/addons/shopfloor/i18n/it.po,sha256=
|
49
|
+
odoo/addons/shopfloor/i18n/it.po,sha256=tgE_XLXDDL2NtcESXyHpol-co3uIUHOPWgcYmgzo1s8,82018
|
50
50
|
odoo/addons/shopfloor/i18n/pt_BR.po,sha256=sXtQtdoHUJOVd3fWiXxQ5uTzCmnHOqAKiHF9xh2pBcU,58581
|
51
|
-
odoo/addons/shopfloor/i18n/shopfloor.pot,sha256=
|
51
|
+
odoo/addons/shopfloor/i18n/shopfloor.pot,sha256=OqD3th-CyEFBoex2gI_qww6S0R-3I0GA6opD0fafA_k,59334
|
52
52
|
odoo/addons/shopfloor/migrations/16.0.2.0.0/post-migration.py,sha256=WfXnS5fj_K78VFaUAe0UiNhFX1C8LA0lkh6Zofllvc4,1311
|
53
53
|
odoo/addons/shopfloor/migrations/16.0.2.4.2/post-init_search_move_line_options.py,sha256=OfsDBUUEKtWQOv9pU86edeFlnT2YiPli4PMpv74Q8IY,1176
|
54
54
|
odoo/addons/shopfloor/migrations/16.0.2.4.2/post-migration.py,sha256=wU-NTy1RLF6iSndiH6jzzIHIlPfX1DBUeB94QpB7TU4,909
|
@@ -73,7 +73,7 @@ odoo/addons/shopfloor/readme/ROADMAP.rst,sha256=jIuyexuxAbyDWBPfoHzWU57KLUto6z56
|
|
73
73
|
odoo/addons/shopfloor/readme/USAGE.rst,sha256=6Of9b6ec7gH1SKhdpBIaavsON0JWBFAzhb8KNz7Nmhc,308
|
74
74
|
odoo/addons/shopfloor/security/groups.xml,sha256=hdLqRUZM_4RQnleinRYhxDxqW4VOI5li4oTsB7m96LQ,578
|
75
75
|
odoo/addons/shopfloor/services/__init__.py,sha256=4lhF0VNx8QosVEZj9QJYgv6oWD0kl9FX80rL5WMrXf4,303
|
76
|
-
odoo/addons/shopfloor/services/checkout.py,sha256=
|
76
|
+
odoo/addons/shopfloor/services/checkout.py,sha256=GbkSbmpgYzdBhYw-k2iqCHUHr9P5sJJDKkxddqmcR0k,79693
|
77
77
|
odoo/addons/shopfloor/services/cluster_picking.py,sha256=v3UduBo5iIUW85nP7JtNFAsFr3LmePvGSK-DXvn_WYI,68221
|
78
78
|
odoo/addons/shopfloor/services/delivery.py,sha256=ko2xre3q-P2LaGd4CMKFWJoavk9QXTI8WKXghf8PoL0,33226
|
79
79
|
odoo/addons/shopfloor/services/location_content_transfer.py,sha256=gn-8W_u2tFT-A69Cot8B6CKG6pFB_21EjC2MYisfDME,49472
|
@@ -85,7 +85,7 @@ odoo/addons/shopfloor/services/zone_picking.py,sha256=9JMZNhSiwkw1DWIrBj1dquM-i1
|
|
85
85
|
odoo/addons/shopfloor/services/forms/__init__.py,sha256=nxwJdKX47hb56ERf4Qb3UE5dkdsHCbkaXMAXs4XMAd8,27
|
86
86
|
odoo/addons/shopfloor/services/forms/picking_form.py,sha256=F15G5yw78Pd1WgPjMz00-K1JyGaTdfdvVYzG4Dubpqk,2626
|
87
87
|
odoo/addons/shopfloor/static/description/icon.png,sha256=6xBPJauaFOF0KDHfHgQopSc28kKvxMaeoQFQWZtfZDo,9455
|
88
|
-
odoo/addons/shopfloor/static/description/index.html,sha256=
|
88
|
+
odoo/addons/shopfloor/static/description/index.html,sha256=xtpdUahpJbHpGpJkDST1F39sl_EFXdNA0H7FPcF1kfI,17547
|
89
89
|
odoo/addons/shopfloor/tests/__init__.py,sha256=4WHuLVjOX_lndDJyuyGcreNckArFJL2HA5PPFlhT6FM,3962
|
90
90
|
odoo/addons/shopfloor/tests/common.py,sha256=v1C7DQT-MvTk81xIYyv--c1BaIpwbia2ey8s35nvrK4,11611
|
91
91
|
odoo/addons/shopfloor/tests/models.py,sha256=jNbYUqYLxkbQMn4j8bejHM3l6CRThJBDfpATl8H83OM,939
|
@@ -98,7 +98,7 @@ odoo/addons/shopfloor/tests/test_actions_search.py,sha256=lQo4G1PRG0iiFD832-H7wD
|
|
98
98
|
odoo/addons/shopfloor/tests/test_actions_search_move_line.py,sha256=ys7Y0mGdg3LNs8l1x8WCx8I_Qb9xsU9XAXOGPKuWv48,5783
|
99
99
|
odoo/addons/shopfloor/tests/test_actions_stock.py,sha256=f4OEAIa39szfOMvVUx686iKrmIusNLgLD9DesOpNH4k,1936
|
100
100
|
odoo/addons/shopfloor/tests/test_checkout_auto_post.py,sha256=enJwyDLRz4N1yv1cCJXijoMZp8lvn1REhh6zCyIsO9c,3107
|
101
|
-
odoo/addons/shopfloor/tests/test_checkout_base.py,sha256=
|
101
|
+
odoo/addons/shopfloor/tests/test_checkout_base.py,sha256=GUb-Ovg0AvNsMVoO9a9-HybKXf3EmWZDJs9SgBSvg14,3574
|
102
102
|
odoo/addons/shopfloor/tests/test_checkout_cancel_line.py,sha256=Fpavj9awDAhjcU9XviMlmXGVHjwxZTra0i8qUT3jQkw,5366
|
103
103
|
odoo/addons/shopfloor/tests/test_checkout_change_packaging.py,sha256=XuqbtEzRTn30o-C_IZejzND_eiPD40ZWgXpAQbpF2zQ,6321
|
104
104
|
odoo/addons/shopfloor/tests/test_checkout_done.py,sha256=8lmJakrwSoZYmT-P_lqhFCnVSoHtJdsfNDYXNXzxuo8,6178
|
@@ -108,7 +108,7 @@ odoo/addons/shopfloor/tests/test_checkout_new_package.py,sha256=9zCyp4XKpBQNKs1i
|
|
108
108
|
odoo/addons/shopfloor/tests/test_checkout_no_package.py,sha256=xqMIvU4VTgtLcwD4pQ8NJftae-KzUh6TnyLnfd6OCNw,3642
|
109
109
|
odoo/addons/shopfloor/tests/test_checkout_scan.py,sha256=ewJaKbiNXIW7PdAvMgqEOBabncnU90xrNUIjGNKcQXY,8286
|
110
110
|
odoo/addons/shopfloor/tests/test_checkout_scan_dest_location.py,sha256=Ikykp7F0zS9qC6f6SbiglKDDI2Q6LFE-1RWuVqlvyN0,3351
|
111
|
-
odoo/addons/shopfloor/tests/test_checkout_scan_line.py,sha256=
|
111
|
+
odoo/addons/shopfloor/tests/test_checkout_scan_line.py,sha256=xPi4OGvcdFuhUetlrxnbBPs4Wa9XpWrSFDwHQ82579A,16860
|
112
112
|
odoo/addons/shopfloor/tests/test_checkout_scan_line_base.py,sha256=QsNHemN4xwgxuS604qIH85wZpTxjhWWu5c7RaupDbag,976
|
113
113
|
odoo/addons/shopfloor/tests/test_checkout_scan_line_no_prefill_qty.py,sha256=v_EiDaEBQbII_CWqiR-c9uKOLEgyK0TrKnOSnBSiFpo,5550
|
114
114
|
odoo/addons/shopfloor/tests/test_checkout_scan_package_action.py,sha256=W-jP5PnAHqHIjTknBiwVADKI4gy-lUQEyWTrXN67lJA,17746
|
@@ -187,7 +187,7 @@ odoo/addons/shopfloor/views/shopfloor_menu.xml,sha256=gepRIcpP6xuYypagEfpJm1s9-A
|
|
187
187
|
odoo/addons/shopfloor/views/stock_location.xml,sha256=d7iqbOQZbb5YPSdAXlQ6spcj8dUvQ37DpEGuaLX5B1M,829
|
188
188
|
odoo/addons/shopfloor/views/stock_move_line.xml,sha256=tn3pV67aRoYmn3qkm3aSgdYArY-z9SIrl_4fpJFy3Jo,1984
|
189
189
|
odoo/addons/shopfloor/views/stock_picking_type.xml,sha256=Ckn2835hO4HtuZQX9x3382C4gs789fb94Cx0444mBkc,800
|
190
|
-
odoo_addon_shopfloor-16.0.2.
|
191
|
-
odoo_addon_shopfloor-16.0.2.
|
192
|
-
odoo_addon_shopfloor-16.0.2.
|
193
|
-
odoo_addon_shopfloor-16.0.2.
|
190
|
+
odoo_addon_shopfloor-16.0.2.5.0.dist-info/METADATA,sha256=OUZe04LW5Zr0laHeMsrM-VGiCAoBXlXhZv8fJc4odNE,6761
|
191
|
+
odoo_addon_shopfloor-16.0.2.5.0.dist-info/WHEEL,sha256=tZoeGjtWxWRfdplE7E3d45VPlLNQnvbKiYnx7gwAy8A,92
|
192
|
+
odoo_addon_shopfloor-16.0.2.5.0.dist-info/top_level.txt,sha256=qBj40grFkGOfDZ2WDSw3y1RnDlgG0u8rP8pvGNdbz4w,5
|
193
|
+
odoo_addon_shopfloor-16.0.2.5.0.dist-info/RECORD,,
|
{odoo_addon_shopfloor-16.0.2.4.2.4.dist-info → odoo_addon_shopfloor-16.0.2.5.0.dist-info}/WHEEL
RENAMED
File without changes
|
File without changes
|