[FIX] web: keep pager in popup list view
authorMartin Trigaux <mat@odoo.com>
Tue, 4 Nov 2014 16:17:45 +0000 (17:17 +0100)
committerMartin Trigaux <mat@odoo.com>
Tue, 4 Nov 2014 16:25:21 +0000 (17:25 +0100)
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

addons/web/static/src/js/views.js

index 1fac579..5fa3c8f 100644 (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
         });