From fe9a3b49354557603e9431f88f791928a4844486 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ra=C3=BAl=20Mart=C3=ADn?= Date: Mon, 21 Jan 2019 09:36:15 +0100 Subject: [PATCH] Skipping potential error when move has been deleted --- stock_request/models/stock_move_line.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/stock_request/models/stock_move_line.py b/stock_request/models/stock_move_line.py index 13f67a87d..76a842084 100644 --- a/stock_request/models/stock_move_line.py +++ b/stock_request/models/stock_move_line.py @@ -39,7 +39,7 @@ class StockMoveLine(models.Model): def _action_done(self): res = super(StockMoveLine, self)._action_done() for ml in self.filtered( - lambda m: m.move_id.allocation_ids): + lambda m: m.exists() and m.move_id.allocation_ids): qty_done = ml.product_uom_id._compute_quantity( ml.qty_done, ml.product_id.uom_id)