From 85a360eeaec84524a4a5180ec06af49fb564d465 Mon Sep 17 00:00:00 2001 From: Martin Trigaux Date: Mon, 21 Aug 2017 09:46:08 +0200 Subject: [PATCH] [FIX] sale_stock: allow to cancel multiple orders MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The action was tagged multi but crashed if executed on more than one order. Courtesy of Andrius Laukavičius --- addons/sale_stock/sale_stock.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/sale_stock/sale_stock.py b/addons/sale_stock/sale_stock.py index 2f817e09978..9ef92b7ee3d 100644 --- a/addons/sale_stock/sale_stock.py +++ b/addons/sale_stock/sale_stock.py @@ -73,7 +73,7 @@ class SaleOrder(models.Model): @api.multi def action_cancel(self): - self.order_line.mapped('procurement_ids').cancel() + self.mapped('order_line').mapped('procurement_ids').cancel() super(SaleOrder, self).action_cancel() @api.multi