[FIX] web: invoke fields_view_get with kwargs instead of positional args

The mapping old api → new api mistakenly takes the last positional argument as
the context (fields_view_get() has an extra parameter after context.)

Fixes issue #2063
This commit is contained in:
Raphael Collet 2014-09-09 16:28:08 +02:00
parent 2f1814088f
commit a6269dcead
1 changed files with 6 additions and 1 deletions

View File

@ -1617,7 +1617,12 @@ 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, args.context, args.toolbar]).then(function(fvg) {
return args.model.call('fields_view_get', {
view_id: args.view_id,
view_type: args.view_type,
context: args.context,
toolbar: args.toolbar
}).then(function(fvg) {
return postprocess(fvg);
});
};