summaryrefslogtreecommitdiff
path: root/addons/web
diff options
context:
space:
mode:
authorniv-openerp <nicolas.vanhoren@openerp.com>2013-03-18 18:45:03 +0100
committerniv-openerp <nicolas.vanhoren@openerp.com>2013-03-18 18:45:03 +0100
commita6a8d71a0e51afd4ebe5fee2dbe8640d2503e9b2 (patch)
tree1e40ef6d7ea4e5731eb3a1fc6ac4aa5dff7b9c30 /addons/web
parent662f4066f83b7211f067376d4e2eaf795db6be2b (diff)
[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
Diffstat (limited to 'addons/web')
-rw-r--r--addons/web/static/src/js/search.js1
-rw-r--r--addons/web/static/src/js/views.js3
2 files changed, 3 insertions, 1 deletions
diff --git a/addons/web/static/src/js/search.js b/addons/web/static/src/js/search.js
index d0dfa9b4bfd..d7331d2cda8 100644
--- a/addons/web/static/src/js/search.js
+++ b/addons/web/static/src/js/search.js
@@ -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) {
diff --git a/addons/web/static/src/js/views.js b/addons/web/static/src/js/views.js
index 7b2fc87aa97..befbc7fe793 100644
--- a/addons/web/static/src/js/views.js
+++ b/addons/web/static/src/js/views.js
@@ -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);
});
};