[FIX]rma_sale: Error when cancelling rma.order.line without sale order lines

This commit is contained in:
manu
2024-02-12 09:48:57 +01:00
committed by Aaron ForgeFlow
parent d3b7be50a9
commit b01f8f2dc1

View File

@@ -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