[FIX] rma: Change code to get the correct rmas (move_ids.rma_ids)

This commit is contained in:
Víctor Martínez
2024-06-28 09:12:03 +02:00
parent eb5fb37108
commit e4f26a6d97

View File

@@ -31,7 +31,7 @@ class StockPicking(models.Model):
def action_view_rma(self):
self.ensure_one()
action = self.env["ir.actions.act_window"]._for_xml_id("rma.rma_action")
rma = self.move_lines.mapped("rma_ids")
rma = self.move_ids.rma_ids
if len(rma) == 1:
action.update(
res_id=rma.id,