[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:
commit
ee262e156a
|
@ -515,7 +515,7 @@ instance.web_calendar.CalendarView = instance.web.View.extend({
|
||||||
var self = this;
|
var self = this;
|
||||||
var index = this.dataset.get_id_index(event_id);
|
var index = this.dataset.get_id_index(event_id);
|
||||||
if (index !== null) {
|
if (index !== null) {
|
||||||
this.dataset.unlink(event_id);
|
this.dataset.unlink(this.dataset.ids[index]);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|
Loading…
Reference in New Issue