Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[16.0][MIG] shopfloor_reception #951

Merged
merged 84 commits into from
Jan 6, 2025
Merged
Changes from 1 commit
Commits
Show all changes
84 commits
Select commit Hold shift + click to select a range
008fe64
add shopfloor_reception
JuMiSanAr Nov 21, 2022
aeccd0d
add shopfloor_reception_mobile
JuMiSanAr Nov 21, 2022
547ed90
[UPD] Update shopfloor_reception.pot
Jan 31, 2023
a21e829
[UPD] README.rst
OCA-git-bot Jan 31, 2023
2afc29a
[ADD] icon.png
OCA-git-bot Jan 31, 2023
f91c762
shopfloor_reception: exclude view locations from scan
JuMiSanAr Feb 2, 2023
8303f35
shopfloor_reception 14.0.1.0.1
OCA-git-bot Feb 2, 2023
6e59e9c
shopfloor_reception: fix test_done_action
JuMiSanAr Feb 6, 2023
b1e0a15
shopfloor_reception 14.0.1.0.2
OCA-git-bot Feb 8, 2023
2608b87
shopfloor_reception: exclude view locations in set_destination
JuMiSanAr Feb 17, 2023
f35eef8
shopfloor_reception: fix auto posting when scan package
JuMiSanAr Feb 20, 2023
04f97a3
shopfloor_reception: normalize location check
JuMiSanAr Feb 20, 2023
619f3ee
shopfloor_reception: prevent selecting multiple moves after scan
JuMiSanAr Feb 20, 2023
5cd1fdf
shopfloor_reception: Fix auto-posting
jbaudoux Feb 21, 2023
6226e2c
shopfloor_reception: Fix wrong location scan
jbaudoux Feb 21, 2023
0ad2e61
shopfloor_reception: update tests after auto-posting
JuMiSanAr Mar 6, 2023
6ef3612
[UPD] README.rst
OCA-git-bot Mar 7, 2023
08faba4
shopfloor_reception 14.0.1.0.3
OCA-git-bot Mar 7, 2023
8c9214a
shopfloor_reception: allow scan lots
mt-software-de Jan 6, 2023
44dd8cb
shopfloor_reception: improve scanning of lots
JuMiSanAr Feb 2, 2023
7eed06f
shopfloor_reception 14.0.1.1.0
OCA-git-bot Mar 7, 2023
42f3330
shopfloor_reception: Solved TODO
jbaudoux Feb 14, 2023
ed14fb7
shopfloor_reception 14.0.1.1.1
OCA-git-bot Mar 8, 2023
079968b
shopfloor: make auto_post menu option available to all scenarios
JuMiSanAr May 2, 2023
bff6502
shopfloor_reception: ask for confirmation when scanning new package
JuMiSanAr Apr 5, 2023
f20b84c
shopfloor_reception: fix check_location_ok applied wrong way
JuMiSanAr Apr 5, 2023
c5709b5
shopfloor_reception: do not open move after scanning product/lot
JuMiSanAr Apr 6, 2023
0a08f89
shopfloor_reception: auto post line if scanning new package
JuMiSanAr Apr 6, 2023
7d74ddd
[UPD] Update shopfloor_reception.pot
May 22, 2023
02bb4cd
shopfloor_reception 14.0.1.2.0
OCA-git-bot May 22, 2023
93c9716
shopfloor_reception 14.0.1.3.0
OCA-git-bot May 29, 2023
2e499a8
shopfloor: Fix product/lot not found message
TDu Mar 15, 2023
1418792
shopfloor_reception 14.0.1.4.0
OCA-git-bot May 29, 2023
9832724
shopfloor_reception: scan_document - use search.find
mmequignon Jan 31, 2023
ad14391
shopfloor_reception: Enable allow_rma
mmequignon Feb 8, 2023
b666e6d
shopfloor: rename is_shopfloor_return to is_shopfloor_created
JuMiSanAr Jun 14, 2023
2745f05
shopfloor_reception: post lines without backorder for shopfloor trans…
JuMiSanAr Jun 15, 2023
715a4e3
[UPD] Update shopfloor_reception.pot
Jul 3, 2023
028d823
shopfloor_reception 14.0.2.0.0
OCA-git-bot Jul 3, 2023
d2737fa
shopfloor_reception: fix when shopfloor doesn't split the selected move
mmequignon Jul 10, 2023
b9f2b23
shopfloor_reception: Allow users to work concurrently
mmequignon Jul 11, 2023
6db526d
shopfloor_reception: Do not process lines with invalid qty
mmequignon Jul 12, 2023
90d3cce
shopfloor_reception: Allow to set qty to 0
mmequignon Jul 13, 2023
1921b2b
[IMP] shopfloor_reception: Refactor test for select_move
mt-software-de Jul 14, 2023
d9c25a4
shopfloor_reception 14.0.2.1.0
OCA-git-bot Jul 25, 2023
9b5cabd
shopfloor_reception 14.0.2.1.1
OCA-git-bot Jul 25, 2023
8fe8dcf
shopfloor_reception 14.0.2.2.0
OCA-git-bot Jul 25, 2023
8448d71
[IMP] shopfloor_reception: Change select_move screen use manual-select
mt-software-de Jul 19, 2023
c08da78
shopfloor_reception 14.0.2.3.0
OCA-git-bot Jul 26, 2023
eec6a16
sh reception: fix select destination package with location
TDu Jul 17, 2023
da13b85
shopfloor_reception: prevent creating lines with negative demand
JuMiSanAr Jul 27, 2023
dc0e5ad
shopfloor_reception 14.0.2.3.1
OCA-git-bot Jul 30, 2023
d3fa94f
shopfloor_*: fix install/uninstall
simahawk Aug 1, 2023
76ed1e8
shopfloor_reception 14.0.2.3.2
OCA-git-bot Aug 16, 2023
653459f
[IMP] shopfloor_reception: adding kwargs to _data_for_stock_picking
mt-software-de Aug 15, 2023
0ca1ff8
shopfloor_reception 14.0.2.4.0
OCA-git-bot Aug 23, 2023
de12b00
shopfloor_reception 14.0.2.5.0
OCA-git-bot Aug 23, 2023
da0b7db
Added translation using Weblate (Italian)
mymage Aug 24, 2023
9ae7edb
[UPD] README.rst
OCA-git-bot Sep 3, 2023
8465803
Translated using Weblate (Italian)
mymage Sep 12, 2023
805541b
shopfloor_reception: add hook for reception package dimension
TDu Jun 7, 2023
d5bbe8a
[BOT] post-merge updates
OCA-git-bot Nov 7, 2023
519be5b
[FIX] shopfloor_reception: multiple moves with same product
mt-software-de Sep 29, 2023
807b562
[BOT] post-merge updates
OCA-git-bot Nov 10, 2023
87b60c8
sf_reception: imp set_quantity confirmation
TDu Aug 10, 2023
191f309
[BOT] post-merge updates
OCA-git-bot Nov 22, 2023
519aa15
shopfloor_reception: Fix qty_done computation
mmequignon Aug 10, 2023
ec05dd3
shopfloor_reception: Split moves before posting
mmequignon Sep 4, 2023
d73f957
shopfloor_reception: Fix uom computation
mmequignon Sep 4, 2023
957dffa
shopfloor_reception: Make select picking by product optional
mmequignon Sep 13, 2023
74f406a
shopfloor_reception: set_quantity - Add cancel button
mmequignon Sep 14, 2023
8bb79f6
shopfloor_reception: fix product_uom_qty at move line create
mmequignon Sep 15, 2023
52cb701
shopfloor_reception: more integration tests
mmequignon Sep 15, 2023
2adb01b
shopfloor_reception: Fix product_uom_qty on move line
TDu Oct 20, 2023
a1b6f64
sf_reception: remove assigning user to picking
TDu Nov 8, 2023
6505b0c
shopfloor_reception: improve move line assignation to user
TDu Nov 8, 2023
719061e
shopfloor_reception: fix lock on move when done
TDu Nov 15, 2023
8378f6f
shopfloor_reception: fix auto post option
TDu Nov 16, 2023
61fb118
[BOT] post-merge updates
OCA-git-bot Dec 4, 2023
ed08cce
[IMP] shopfloor_reception: Return even if not fully delivered
mt-software-de Apr 26, 2024
f7daa22
[BOT] post-merge updates
OCA-git-bot May 6, 2024
8c15aa2
[REF] shopfloor_reception
May 29, 2024
e5b263a
[BOT] post-merge updates
OCA-git-bot Oct 4, 2024
efd9014
[16.0][MIG] shopfloor_reception
sbejaoui Nov 25, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
shopfloor_reception: improve scanning of lots
JuMiSanAr authored and sbejaoui committed Jan 1, 2025
commit 44dd8cb566ef713dbddc2fc94b7eeb2e55d77909
47 changes: 29 additions & 18 deletions shopfloor_reception/services/reception.py
Original file line number Diff line number Diff line change
@@ -212,8 +212,7 @@ def _select_document_from_lot(self, lot):
move_lines, self.msg_store.no_transfer_for_lot
)

def _select_line(self, picking, line, increase_qty_done_by=1):
move = line.move_id
def _select_line(self, picking, line, move, increase_qty_done_by=1):
product = line.product_id
if line:
# The line quantity to do needs to correspond to
@@ -238,7 +237,7 @@ def _select_line_from_product(self, picking, move, product):
and l.shopfloor_user_id.id in [False, self.env.uid]
)
)
return self._select_line(picking, line)
return self._select_line(picking, line, move)

def _select_line_from_packaging(self, picking, move, packaging):
line = fields.first(
@@ -248,7 +247,7 @@ def _select_line_from_packaging(self, picking, move, packaging):
and l.shopfloor_user_id.id in [False, self.env.uid]
)
)
return self._select_line(picking, line, packaging.qty)
return self._select_line(picking, line, move, packaging.qty)

def _select_line_from_lot(self, picking, move, lot):
line = fields.first(
@@ -260,7 +259,7 @@ def _select_line_from_lot(self, picking, move, lot):
)
if not line:
return
return self._select_line(picking, line)
return self._select_line(picking, line, move)

def _order_stock_picking(self):
# We sort by scheduled date first. However, there might be a case
@@ -333,7 +332,7 @@ def _scan_line__by_product(self, picking, barcode):
== -1
)
)
message = self._check_move_available(move, "product")
message = self._check_move_available(move, message_code="product")
if message:
return self._response_for_select_move(
picking,
@@ -356,7 +355,7 @@ def _scan_line__by_packaging(self, picking, barcode):
== -1
)
)
message = self._check_move_available(move, "packaging")
message = self._check_move_available(move, message_code="packaging")
if message:
return self._response_for_select_move(
picking,
@@ -365,22 +364,34 @@ def _scan_line__by_packaging(self, picking, barcode):
return self._select_line_from_packaging(picking, move, packaging)

def _scan_line__by_lot(self, picking, barcode):
move = picking.move_lines.move_line_ids.filtered(
line = picking.move_line_ids.filtered(
lambda l: barcode == l.lot_id.name or barcode == l.lot_name
)
message = self._check_move_available(move)
if message:
return self._response_for_select_move(
picking,
message=message,
move = line.move_id
search = self._actions_for("search")
lot = search.lot_from_scan(barcode)
if not move:
line = picking.move_line_ids.filtered(
lambda l: not l.lot_id
and not l.lot_name
and l.product_id == lot.product_id
)
return self._select_line_from_lot(picking, move, barcode)
if line:
return self._select_line(picking, line, move)
else:
message = self._check_move_available(move, message_code="lot")
if message:
return self._response_for_select_move(
picking,
message=message,
)
if lot:
return self._select_line_from_lot(picking, move, barcode)

def _check_move_available(self, move, message_code="product"):
if not move and message_code == "product":
return self.msg_store.product_not_found_or_already_in_dest_package()
if not move and message_code == "packaging":
return self.msg_store.packaging_not_found_or_already_in_dest_package()
if not move:
message_code = message_code.capitalize()
return self.msg_store.x_not_found_or_already_in_dest_package(message_code)
line_without_package = any(
not ml.result_package_id for ml in move.move_line_ids
)
24 changes: 24 additions & 0 deletions shopfloor_reception/tests/test_select_move.py
Original file line number Diff line number Diff line change
@@ -68,6 +68,30 @@ def test_scan_packaging(self):
},
)

def test_scan_lot(self):
picking = self._create_picking()
lot = self._create_lot()
selected_move_line = picking.move_line_ids.filtered(
lambda l: l.product_id == self.product_a
)
selected_move_line.lot_id = lot
response = self.service.dispatch(
"scan_line",
params={
"picking_id": picking.id,
"barcode": lot.name,
},
)
data = self.data.picking(picking)
self.assert_response(
response,
next_state="set_quantity",
data={
"picking": data,
"selected_move_line": self.data.move_lines(selected_move_line),
},
)

def test_scan_not_tracked_product(self):
self.product_a.tracking = "none"
picking = self._create_picking()