Hello guys, I'd like create a function for autofill a many2many field with the registers of a model but my many2many field is always empty, this is my code:
asistentes_de_eventos = fields.Many2many('event.registration', string='Asistentes al evento', compute='_compute_asistentes_evento')
@api.multi
def _compute_asistentes_evento(self):
pruebaaux = []
pruebaaux = [(4,[self.env['event.registration'].ids])]
self.asistentes_de_eventos = pruebaaux
Could anyone help me please? Thank you so much!