From bcf9de6573bdab3bd79e2a729b723aff196ca054 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 9dac20ae..4f722a08 100644 --- a/rma_sale/models/rma_order_line.py +++ b/rma_sale/models/rma_order_line.py @@ -209,7 +209,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