[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.""" """Test planned transfer."""
wizard = self._create_wizard(self.internal_loc_1, self.internal_loc_2) wizard = self._create_wizard(self.internal_loc_1, self.internal_loc_2)
wizard.onchange_origin_location() wizard.onchange_origin_location()
wizard.add_lines()
wizard = wizard.with_context({'planned': True}) wizard = wizard.with_context({'planned': True})
wizard.action_move_location() wizard.action_move_location()
picking = wizard.picking_id picking = wizard.picking_id

View File

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