From 47219e96e19b6c5badf7d4e99043817dc68812ac Mon Sep 17 00:00:00 2001 From: Shreya Modi Date: Thu, 22 Aug 2019 05:04:55 +0000 Subject: [PATCH] [IMP] stock: change the dest location of product on state change -the location of the scrapping product was set to its default vendor location, it should be destination location. task-1959647 --- addons/stock/models/stock_scrap.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/stock/models/stock_scrap.py b/addons/stock/models/stock_scrap.py index b700faf0317..91afc4ca624 100644 --- a/addons/stock/models/stock_scrap.py +++ b/addons/stock/models/stock_scrap.py @@ -73,7 +73,7 @@ class StockScrap(models.Model): if self.picking_id: for move_line in self.picking_id.move_line_ids: if move_line.product_id == self.product_id: - self.location_id = move_line.location_id + self.location_id = move_line.location_id if move_line.state != 'done' else move_line.location_dest_id break def unlink(self):