[MERGE] forward port of branch 8.0 up to ed92589
[odoo/odoo.git] / addons / calendar / calendar.py
index 77d51ce..0577023 100644 (file)
@@ -1526,8 +1526,8 @@ class calendar_event(osv.Model):
         res = False
         new_id = False
 
-         # Special write of complex IDS
-        for event_id in ids:
+        # Special write of complex IDS
+        for event_id in list(ids):
             if len(str(event_id).split('-')) == 1:
                 continue
 
@@ -1545,7 +1545,7 @@ class calendar_event(osv.Model):
                 if data.get('rrule'):
                     new_id = self._detach_one_event(cr, uid, event_id, values, context=None)
 
-        res = super(calendar_event, self).write(cr, uid, ids, values, context=context)
+        res = super(calendar_event, self).write(cr, uid, [int(event_id) for event_id in ids], values, context=context)
 
         # set end_date for calendar searching
         if values.get('recurrency', True) and values.get('end_type', 'count') in ('count', unicode('count')) and \