diff --git a/addons/web/static/src/js/list.js b/addons/web/static/src/js/list.js index 60ba22dc68c..e0c6405db2f 100644 --- a/addons/web/static/src/js/list.js +++ b/addons/web/static/src/js/list.js @@ -775,6 +775,31 @@ openerp.web.ListView.List = openerp.web.Class.extend( /** @lends openerp.web.Lis this.$current.empty().append( QWeb.render('ListView.rows', _.extend({ render_cell: openerp.web.format_cell}, this))); + this.pad_table_to(5); + }, + pad_table_to: function (count) { + if (this.records.length >= count || + _(this.columns).any(function(column) { return column.meta; })) { + return; + } + var cells = []; + if (this.options.selectable) { + cells.push(''); + } + _(this.columns).each(function(column) { + if (column.invisible !== '1') { + cells.push(' '); + } + }); + if (this.options.deletable) { + cells.push(''); + } + cells.unshift(''); + cells.push(''); + + var row = cells.join(''); + this.$current.append(new Array(count - this.records.length + 1).join(row)); + this.refresh_zebra(this.records.length); }, /** * Gets the ids of all currently selected records, if any