[FIX] delete event in calendar, courtesy of Holger Brunn

Calendar has type mismatche issues where event ids are obtained as
strings even when they are numbers, this is (ish) why get_id_index was
added to Dataset.

When having an event_id in calendar, can't use event_id directly needs
to ensure we have valid index and use that index to get "correct (ly
typed)" id from dataset.

bzr revid: xmo@openerp.com-20130516144904-hbfd5zkl8lic33n8
This commit is contained in:
Xavier Morel 2013-05-16 16:49:04 +02:00
commit ee262e156a
1 changed files with 1 additions and 1 deletions

View File

@ -515,7 +515,7 @@ instance.web_calendar.CalendarView = instance.web.View.extend({
var self = this;
var index = this.dataset.get_id_index(event_id);
if (index !== null) {
this.dataset.unlink(event_id);
this.dataset.unlink(this.dataset.ids[index]);
}
},
});