[FIX] Calendar view reloads event using toStringed id
authorFabien Meghazi <fme@openerp.com>
Tue, 18 Dec 2012 15:16:57 +0000 (16:16 +0100)
committerFabien Meghazi <fme@openerp.com>
Tue, 18 Dec 2012 15:16:57 +0000 (16:16 +0100)
bzr revid: fme@openerp.com-20121218151657-ly74ph77q1c7nicz

addons/web_calendar/static/src/js/calendar.js

index 81e7712..9cac4db 100644 (file)
@@ -465,12 +465,12 @@ instance.web_calendar.CalendarView = instance.web.View.extend({
             });
         } else {
             var pop = new instance.web.form.FormOpenPopup(this);
-            var id_for_buggy_addons = this.dataset.ids[index]; // ids could be non numeric
-            pop.show_element(this.dataset.model, id_for_buggy_addons, this.dataset.get_context(), {
+            var id_from_dataset = this.dataset.ids[index]; // dhtmlx scheduler loses id's type
+            pop.show_element(this.dataset.model, id_from_dataset, this.dataset.get_context(), {
                 title: _t("Edit: ") + this.name
             });
             pop.on('write_completed', self, function(){
-                self.reload_event(event_id);
+                self.reload_event(id_from_dataset);
             });
         }
     },