Skip to content

Commit

Permalink
Merge PR #736 into 10.0
Browse files Browse the repository at this point in the history
Signed-off-by jbeficent
  • Loading branch information
OCA-git-bot committed Sep 16, 2019
2 parents 3e577f0 + 597a2dd commit ae9bc05
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
2 changes: 1 addition & 1 deletion purchase_location_by_line/models/purchase.py
Expand Up @@ -52,6 +52,6 @@ def _create_stock_moves(self, picking):

location = line.location_dest_id or default_picking_location
if location:
line.move_ids.write(
line.move_ids.filtered(lambda m: m.state != 'done').write(
{'location_dest_id': location.id})
return res
10 changes: 10 additions & 0 deletions purchase_location_by_line/tests/test_purchase_delivery.py
Expand Up @@ -181,3 +181,13 @@ def test_check_multiple_locations_multiple_dates_02(self):
self.assertEquals(
sorted_pickings[2].min_date[:10], self.date_later,
"The second picking must be planned at the latest date")

def test_modify_confirmed(self):
# if all moves contain the location no need to update

self.po.button_confirm()
self.po.order_line[0].write({'product_qty': 43})
self.assertEqual(
self.po.order_line[0].move_ids.mapped('location_dest_id'),
self.l1
)

0 comments on commit ae9bc05

Please sign in to comment.