[FIX] pager: do not try to toggle the visibility if the pager do not exists yet

bzr revid: mat@openerp.com-20140314112709-0sqq6tcpmza34q1e
This commit is contained in:
Martin Trigaux 2014-03-14 12:27:09 +01:00
parent 9e002d9233
commit 08e07af590
1 changed files with 3 additions and 1 deletions

View File

@ -271,12 +271,14 @@ instance.web.FormView = instance.web.View.extend(instance.web.form.FieldManagerM
if (this.$buttons) {
this.$buttons.show();
}
if (this.$pager) {
this.$pager.toggle(this.dataset.ids.length > 1);
}
this.$el.show().css({
opacity: '0',
filter: 'alpha(opacity = 0)'
});
this.$el.add(this.$buttons).removeClass('oe_form_dirty');
this.$pager.toggle(this.dataset.ids.length > 1);
var shown = this.has_been_loaded;
if (options.reload !== false) {