[CHG] there always is an editor in the editable listview, destroy just before creating the new one

bzr revid: xmo@openerp.com-20120726143320-4cdze45po1g581lu
This commit is contained in:
Xavier Morel 2012-07-26 16:33:20 +02:00
parent 7ccf2ad2a5
commit de1f6488a7
1 changed files with 1 additions and 3 deletions

View File

@ -96,9 +96,6 @@ openerp.web.list_editable = function (instance) {
},
on_loaded: function (data, grouped) {
var self = this;
if (this.editor) {
this.editor.destroy();
}
// tree/@editable takes priority on everything else if present.
var result = this._super(data, grouped);
if (this.editable()) {
@ -118,6 +115,7 @@ openerp.web.list_editable = function (instance) {
self.start_edition();
}
});
this.editor.destroy();
// Editor is not restartable due to formview not being
// restartable
this.editor = this.make_editor();