[11.0][FIX] stock_move_location:

* fix test as per migration
* fix inconsistency in reserved quantity for planned transfers
This commit is contained in:
Joan Sisquella
2019-12-09 12:58:58 +01:00
committed by Joan Sisquella
parent 31ccc4ae4b
commit 6c466aa2e0
2 changed files with 3 additions and 3 deletions

View File

@@ -100,7 +100,6 @@ class TestMoveLocation(TestsCommon):
"""Test planned transfer."""
wizard = self._create_wizard(self.internal_loc_1, self.internal_loc_2)
wizard.onchange_origin_location()
wizard.add_lines()
wizard = wizard.with_context({'planned': True})
wizard.action_move_location()
picking = wizard.picking_id

View File

@@ -151,8 +151,9 @@ class StockMoveLocationWizard(models.TransientModel):
move = self.env["stock.move"].create(
self._get_move_values(picking, lines),
)
for line in lines:
line.create_move_lines(picking, move)
if not self.env.context.get("planned"):
for line in lines:
line.create_move_lines(picking, move)
return move
@api.multi