[FIX] Calendar - Fix unlink which can try to unlink a numeric string without cast it in integer

bzr revid: jke@openerp.com-20140430133623-l6iynwdp0ampy23s
This commit is contained in:
Kersten Jeremy 2014-04-30 07:36:23 -06:00
parent d9c3c175bd
commit 5d6f8bf45c
1 changed files with 2 additions and 2 deletions

View File

@ -1629,10 +1629,10 @@ class calendar_event(osv.Model):
for event_id in ids:
if can_be_deleted and len(str(event_id).split('-')) == 1: # if ID REAL
if self.browse(cr, uid, event_id).recurrent_id:
if self.browse(cr, uid, int(event_id), context).recurrent_id:
ids_to_exclure.append(event_id)
else:
ids_to_unlink.append(event_id)
ids_to_unlink.append(int(event_id))
else:
ids_to_exclure.append(event_id)