[MERGE] from master
[odoo/odoo.git] / addons / web_calendar / static / src / js / web_calendar.js
index 7b619ea..f612689 100644 (file)
@@ -833,10 +833,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
                 });