summaryrefslogtreecommitdiff
path: root/addons/web/static
diff options
context:
space:
mode:
authorJigar Amin - OpenERP <jam@tinyerp.com>2012-08-24 11:15:47 +0530
committerJigar Amin - OpenERP <jam@tinyerp.com>2012-08-24 11:15:47 +0530
commit813db083ff7844d2ffcdcb8a2ad5bedf3a0bfaf4 (patch)
tree284939a62abfe9ce8003826052693e9b57b545ce /addons/web/static
parent12f01f09a12548e7f984449d46206864eebed409 (diff)
[REF] refectroed the row count code
bzr revid: jam@tinyerp.com-20120824054547-v3me14ca341rkj44
Diffstat (limited to 'addons/web/static')
-rw-r--r--addons/web/static/src/js/view_form.js6
1 files changed, 1 insertions, 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')) {