-
-
Notifications
You must be signed in to change notification settings - Fork 195
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[IMP] shopfloor: Sync src location on single_pack_transer and single_…
…product_transfer
- Loading branch information
1 parent
f9be0e8
commit 9dc0af0
Showing
6 changed files
with
48 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,6 @@ | ||
# Copyright 2020 Camptocamp SA (http://www.camptocamp.com) | ||
# Copyright 2020 Akretion (http://www.akretion.com) | ||
# Copyright 2025 Michael Tietz (MT Software) <[email protected]> | ||
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). | ||
|
||
from odoo.tests.common import Form | ||
|
@@ -449,11 +450,24 @@ def test_validate(self): | |
|
||
self.assertRecordValues( | ||
package_level.move_line_ids, | ||
[{"qty_done": 1.0, "location_dest_id": self.shelf2.id, "state": "done"}], | ||
[ | ||
{ | ||
"qty_done": 1.0, | ||
"location_dest_id": self.shelf2.id, | ||
"location_id": self.shelf1.id, | ||
"state": "done", | ||
} | ||
], | ||
) | ||
self.assertRecordValues( | ||
package_level.move_line_ids.move_id, | ||
[{"location_dest_id": self.shelf2.id, "state": "done"}], | ||
[ | ||
{ | ||
"location_dest_id": self.shelf2.id, | ||
"location_id": self.shelf1.id, | ||
"state": "done", | ||
} | ||
], | ||
) | ||
|
||
def test_validate_completion_info(self): | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,5 @@ | ||
# Copyright 2022 Camptocamp SA | ||
# Copyright 2025 Michael Tietz (MT Software) <[email protected]> | ||
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl) | ||
|
||
from .common import CommonCase | ||
|
@@ -8,7 +9,7 @@ class TestSetQuantity(CommonCase): | |
@classmethod | ||
def setUpClass(cls): | ||
super().setUpClass() | ||
cls.location = cls.location_src | ||
cls.location = cls.env.ref("stock.stock_location_components") | ||
cls.product = cls.product_a | ||
cls.packaging = cls.product_a_packaging | ||
cls.packaging.qty = 5 | ||
|
@@ -725,6 +726,12 @@ def test_set_quantity_scan_location(self): | |
self.assertFalse(picking.move_line_ids.result_package_id) | ||
self.assertEqual(picking.user_id.id, False) | ||
self.assertEqual(picking.move_line_ids.shopfloor_user_id.id, False) | ||
self.assertEqual(picking.move_line_ids.location_dest_id, self.dispatch_location) | ||
self.assertEqual(picking.move_line_ids.location_id, self.location) | ||
self.assertEqual( | ||
picking.move_line_ids.move_id.location_dest_id, self.dispatch_location | ||
) | ||
self.assertEqual(picking.move_line_ids.move_id.location_id, self.location) | ||
|
||
def test_set_quantity_scan_location_allow_move_create(self): | ||
self.menu.sudo().allow_move_create = True | ||
|
@@ -754,6 +761,12 @@ def test_set_quantity_scan_location_allow_move_create(self): | |
self.assertFalse(backorder) | ||
self.assertEqual(picking.move_line_ids.qty_done, 6.0) | ||
self.assertEqual(picking.move_line_ids.state, "done") | ||
self.assertEqual(picking.move_line_ids.location_dest_id, self.dispatch_location) | ||
self.assertEqual(picking.move_line_ids.location_id, self.location) | ||
self.assertEqual( | ||
picking.move_line_ids.move_id.location_dest_id, self.dispatch_location | ||
) | ||
self.assertEqual(picking.move_line_ids.move_id.location_id, self.location) | ||
|
||
def test_set_quantity_scan_package_not_empty(self): | ||
# We scan a package that's not empty | ||
|