diff --git a/addons/sync_google_calendar/wizard/wizard_import_calendar_events.py b/addons/sync_google_calendar/wizard/wizard_import_calendar_events.py index 6912e1f358c..a0f66b7cca9 100644 --- a/addons/sync_google_calendar/wizard/wizard_import_calendar_events.py +++ b/addons/sync_google_calendar/wizard/wizard_import_calendar_events.py @@ -100,8 +100,12 @@ class synchronize_google_calendar_events(osv.osv_memory): def get_events(self, cr, uid, event_feed, context=None): meeting_obj = self.pool.get('crm.meeting') + categ_obj = self.pool.get('crm.case.categ') model_obj = self.pool.get('ir.model.data') + object_id = self.pool.get('ir.model').search(cr, uid, [('model', '=', 'crm.meeting')]) meeting_ids = [] + categ_id = categ_obj.create(cr, uid, {'name': event_feed.title.text, + 'object_id': object_id and object_id[0] }) for feed in event_feed.entry: google_id = feed.id.text model_data = { @@ -112,6 +116,7 @@ class synchronize_google_calendar_events(osv.osv_memory): vals = { 'name': feed.title.text, 'description': feed.content.text, + 'categ_id': categ_id } timestring, timestring_end = _get_tinydates(self, feed.when[0].start_time, feed.when[0].end_time) vals.update({'date': timestring, 'date_deadline': timestring_end})