mirror of
https://github.com/OCA/stock-logistics-warehouse.git
synced 2025-01-21 14:27:28 +02:00
[FIX] Stock Move Location: apply putaway rules
- The function called to get the putaway rule when creating the Move Lines does not exist in odoo. - Add test to actually commit the Wizard and test the resulting move.lines
This commit is contained in:
@@ -156,6 +156,14 @@ class TestMoveLocation(TestsCommon):
|
||||
putaway_line.destination_location_id, self.internal_loc_2_shelf
|
||||
)
|
||||
|
||||
# Actually commit the wizard and check stock.move.line.location_dest_id
|
||||
ret = wizard.action_move_location()
|
||||
picking = self.env["stock.picking"].browse([ret["res_id"]])
|
||||
putaway_move_line = picking.move_line_ids.filtered(
|
||||
lambda l: l.product_id == self.product_no_lots
|
||||
)[0]
|
||||
self.assertEqual(putaway_move_line.location_dest_id, self.internal_loc_2_shelf)
|
||||
|
||||
def test_delivery_order_assignation_after_transfer(self):
|
||||
"""
|
||||
Make sure using the wizard doesn't break assignation on delivery orders
|
||||
|
||||
@@ -103,7 +103,7 @@ class StockMoveLocationWizardLine(models.TransientModel):
|
||||
self.ensure_one()
|
||||
location_dest_id = (
|
||||
self.move_location_wizard_id.apply_putaway_strategy
|
||||
and self.destination_location_id.get_putaway_strategy(self.product_id).id
|
||||
and self.destination_location_id._get_putaway_strategy(self.product_id).id
|
||||
or self.destination_location_id.id
|
||||
)
|
||||
qty_todo, qty_done = self._get_available_quantity()
|
||||
|
||||
Reference in New Issue
Block a user