}
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
});