[FIX] web_calendar: improve the commit 787147d
. This commit was fixing bug in other module that calendar which was open an event in popup view. Because browse/read by default was unable to read string id. The fix was too restrictif, because calendar need to read/browse string; we cannot cast this id in Int else we loose the virtual part. parseInt('12-20140512') -> 12.
This commit is contained in:
parent
de641ccbf8
commit
8251806741
|
@ -820,10 +820,11 @@ openerp.web_calendar = function(instance) {
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
var pop = new instance.web.form.FormOpenPopup(this);
|
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),
|
title: _.str.sprintf(_t("View: %s"),title),
|
||||||
view_id: +this.open_popup_action,
|
view_id: +this.open_popup_action,
|
||||||
res_id: id,
|
res_id: id_cast,
|
||||||
target: 'new',
|
target: 'new',
|
||||||
readonly:true
|
readonly:true
|
||||||
});
|
});
|
||||||
|
|
Loading…
Reference in New Issue