How to hide the searchbar and pager for a particular model and specific view?
By a custom javascript module? I noticed code cited below in the views.js in the web module. tried to change the board.board to res.partner for example and view_mode to view_id ... but didn't work. Any help appreciated.
instance.web.ViewManagerAction = instance.web.ViewManager.extend({
template:"ViewManagerAction",
/**
* @constructs instance.web.ViewManagerAction
* @extends instance.web.ViewManager
*
* @param {instance.web.ActionManager} parent parent object/widget
* @param {Object} action descriptor for the action this viewmanager needs to manage its views.
*/
init: function(parent, action) {
// dataset initialization will take the session from ``this``, so if we
// do not have it yet (and we don't, because we've not called our own
// ``_super()``) rpc requests will blow up.
var flags = action.flags || {};
if (!('auto_search' in flags)) {
flags.auto_search = action.auto_search !== false;
}
if (action.res_model == 'board.board' && action.view_mode === 'form') {
// Special case for Dashboards
_.extend(flags, {
views_switcher : false,
display_title : false,
search_view : false,
pager : false,
sidebar : false,
action_buttons : false
});
}