From b01f8f2dc1c7080c9acda187095ed05d0ace9fb5 Mon Sep 17 00:00:00 2001 From: manu Date: Mon, 12 Feb 2024 09:48:57 +0100 Subject: [PATCH] [FIX]rma_sale: Error when cancelling rma.order.line without sale order lines --- rma_sale/models/rma_order_line.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rma_sale/models/rma_order_line.py b/rma_sale/models/rma_order_line.py index 0d06b8c9..1edfd66d 100644 --- a/rma_sale/models/rma_order_line.py +++ b/rma_sale/models/rma_order_line.py @@ -216,7 +216,7 @@ class RmaOrderLine(models.Model): def action_rma_cancel(self): res = super().action_rma_cancel() - for line in self: + for line in self.filtered("sale_line_ids"): line.sale_line_ids.mapped("order_id").action_cancel() return res