[FIX] calls to fields_view_get do not pass the correct context, fails in o2m
lp bug: https://launchpad.net/bugs/1091204 fixed bzr revid: nicolas.vanhoren@openerp.com-20130318174503-7xp04ccghdbqfvrl
This commit is contained in:
parent
662f4066f8
commit
a6a8d71a0e
|
@ -389,6 +389,7 @@ instance.web.SearchView = instance.web.Widget.extend(/** @lends instance.web.Sea
|
|||
model: this.dataset._model,
|
||||
view_id: this.view_id,
|
||||
view_type: 'search',
|
||||
context: this.dataset.get_context(),
|
||||
});
|
||||
|
||||
$.when(load_view).then(function (r) {
|
||||
|
|
|
@ -1282,6 +1282,7 @@ instance.web.View = instance.web.Widget.extend({
|
|||
"view_id": this.view_id,
|
||||
"view_type": this.view_type,
|
||||
"toolbar": !!this.options.$sidebar,
|
||||
"context": this.dataset.get_context(),
|
||||
});
|
||||
}
|
||||
return view_loaded_def.then(function(r) {
|
||||
|
@ -1496,7 +1497,7 @@ instance.web.fields_view_get = function(args) {
|
|||
if (typeof model === 'string') {
|
||||
model = new instance.web.Model(args.model, args.context);
|
||||
}
|
||||
return args.model.call('fields_view_get', [args.view_id, args.view_type, model.context(), args.toolbar]).then(function(fvg) {
|
||||
return args.model.call('fields_view_get', [args.view_id, args.view_type, args.context, args.toolbar]).then(function(fvg) {
|
||||
return postprocess(fvg);
|
||||
});
|
||||
};
|
||||
|
|
Loading…
Reference in New Issue