[IMP] hide [new] button when editable list grouped: we don't know where to put the new record, so let's remove the ability to create one as long as it's not a requested feature

bzr revid: xmo@openerp.com-20110607085717-qstun0iymupoyw35
This commit is contained in:
Xavier Morel 2011-06-07 10:57:17 +02:00
parent f0bce0a045
commit 3d5af3fa73
1 changed files with 3 additions and 1 deletions

View File

@ -134,7 +134,9 @@ openerp.base.ListView = openerp.base.View.extend( /** @lends openerp.base.ListVi
this.$element.html(QWeb.render("ListView", this));
// Head hook
this.$element.find('#oe-list-add').click(this.do_add_record);
this.$element.find('#oe-list-add')
.click(this.do_add_record)
.toggle(!(grouped && this.options.editable));
this.$element.find('#oe-list-delete')
.hide()
.click(this.do_delete_selected);