Odoo synchronization with Google agenda

21 Views Asked by At

I have synchronize the Odoo calendar with the Google agenda but when i create a calendar event in Odoo (in python), it will create an event in google agenda for the attendees and the active user who created the calendar event.

I need to create the event in Google agenda only for attendees and not for the active user who created the calendar event.

I tried to set the user_id to False in the code but doesn't work.

   new_calendar_event = {
            'name': _(name_slot_calendar),
            'partner_ids': user_ids.mapped('partner_id'),
            'start': date_deadline,
            'stop': date_deadline,
            'allday': True,
            'duration': 8,
            'user_id': False,
            'attendee_ids': [(0, 0, {'partner_id': partner.id}) for partner in user_ids.mapped('partner_id')],
        }
   self.env['calendar.event'].create(new_calendar_event)

The active user in not contains in the partner_ids and attendee_ids.

I don't find any documentation about this point.

Do you have any idea ?

Thank's in advance

0

There are 0 best solutions below