[FIX] web: keep pager in popup list view

When an action opens records in list (or other) mode in a popup (target:new), the pager should be kept. It can be removed in form view.
Fixes #742
This commit is contained in:
Martin Trigaux 2014-11-04 17:17:45 +01:00
parent 5035c76f42
commit 42cdf0071e
1 changed files with 2 additions and 1 deletions

View File

@ -333,12 +333,13 @@ instance.web.ActionManager = instance.web.Widget.extend({
var type = action.type.replace(/\./g,'_');
var popup = action.target === 'new';
var inline = action.target === 'inline' || action.target === 'inlineview';
var form = _.str.startsWith(action.view_mode, 'form');
action.flags = _.defaults(action.flags || {}, {
views_switcher : !popup && !inline,
search_view : !popup && !inline,
action_buttons : !popup && !inline,
sidebar : !popup && !inline,
pager : !popup && !inline,
pager : (!popup || !form) && !inline,
display_title : !popup,
search_disable_custom_filters: action.context && action.context.search_disable_custom_filters
});