diff --git a/rma/models/rma.py b/rma/models/rma.py index f48a3fb0..10616c89 100644 --- a/rma/models/rma.py +++ b/rma/models/rma.py @@ -508,7 +508,7 @@ class RMA(models.Model): lines = make_line_obj.create({ 'rma_id': rma.id, }) - action = self.env.ref('rma.action_rma_add_lines').read()[0] + action = self.env['ir.actions.act_window']._for_xml_id('rma.action_rma_add_lines') action['res_id'] = lines.id return action diff --git a/rma_product_cores/models/rma.py b/rma_product_cores/models/rma.py index 1d52747c..1576e6ff 100644 --- a/rma_product_cores/models/rma.py +++ b/rma_product_cores/models/rma.py @@ -176,7 +176,7 @@ class RMA(models.Model): lines = make_line_obj.create({ 'rma_id': rma.id, }) - action = self.env.ref('rma_product_cores.action_rma_add_lines').read()[0] + action = self.env['ir.actions.act_window']._for_xml_id('rma_product_cores.action_rma_add_lines') action['res_id'] = lines.id return action diff --git a/rma_sale/models/rma.py b/rma_sale/models/rma.py index b349eed7..9ad1d424 100644 --- a/rma_sale/models/rma.py +++ b/rma_sale/models/rma.py @@ -211,7 +211,7 @@ class RMA(models.Model): lines = make_line_obj.create({ 'rma_id': rma.id, }) - action = self.env.ref('rma_sale.action_rma_add_lines').read()[0] + action = self.env['ir.actions.act_window']._for_xml_id('rma_sale.action_rma_add_lines') action['res_id'] = lines.id return action