Hello guys, I'm working in the event.event (Events) model in Odoo 9, I want to add inside the events a Many2many field with all the attendees from event.registration that will go to that event, but I can't make it automatically, I tried this:
asistentes_de_eventos = fields.Many2many('event.registration', store=True, compute="_get_asistentes")
@api.multi
def _get_asistentes(self):
aux_ids = self.env['event.registration']
for aux in aux_ids:
self.asistentes_de_eventos = [(4,[aux.id])]
But my many2many field is empty, could anyone help me?
Thank You.