[FIX] web_calendar: improve the commit 787147d. This commit was fixing bug in other...
authorJeremy Kersten <jke@odoo.com>
Fri, 21 Nov 2014 10:58:39 +0000 (11:58 +0100)
committerJeremy Kersten <jke@odoo.com>
Fri, 21 Nov 2014 13:07:09 +0000 (14:07 +0100)
addons/web_calendar/static/src/js/web_calendar.js

index 2aa40c3..20043ac 100644 (file)
@@ -820,10 +820,11 @@ openerp.web_calendar = function(instance) {
             }
             else {
                 var pop = new instance.web.form.FormOpenPopup(this);
-                pop.show_element(this.dataset.model, parseInt(id), this.dataset.get_context(), {
+                var id_cast = parseInt(id).toString() == id ? parseInt(id) : id;
+                pop.show_element(this.dataset.model, id_cast, this.dataset.get_context(), {
                     title: _.str.sprintf(_t("View: %s"),title),
                     view_id: +this.open_popup_action,
-                    res_id: id,
+                    res_id: id_cast,
                     target: 'new',
                     readonly:true
                 });