From 813db083ff7844d2ffcdcb8a2ad5bedf3a0bfaf4 Mon Sep 17 00:00:00 2001 From: Jigar Amin - OpenERP Date: Fri, 24 Aug 2012 11:15:47 +0530 Subject: [PATCH] [REF] refectroed the row count code bzr revid: jam@tinyerp.com-20120824054547-v3me14ca341rkj44 --- addons/web/static/src/js/view_form.js | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/addons/web/static/src/js/view_form.js b/addons/web/static/src/js/view_form.js index e91d343a618..de7b737ad34 100644 --- a/addons/web/static/src/js/view_form.js +++ b/addons/web/static/src/js/view_form.js @@ -3566,11 +3566,7 @@ instance.web.form.One2ManyListView = instance.web.ListView.extend({ }); instance.web.form.One2ManyList = instance.web.ListView.List.extend({ pad_table_to: function (count) { - count = count > 0 ? count - 1 : 0 - if (! this.view._is_action_enabled('create')){ - count = this.records.length - } - this._super(count); + this._super(this.view._is_action_enabled('create') ? (count > 0 ? count - 1 : 0) : this.records.length); // magical invocation of wtf does that do if (this.view.o2m.get('effective_readonly')) {